90% single-page-per-category

Code Review | Single Page Per Category

WordPress plugin Single Page Per Category scored90%from 54 tests.

About plugin

  • Plugin page: single-page-per-c...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 7, 2014
  • Latest release: May 21, 2015
  • Number of updates: 6
  • Update frequency: every 53.8 days
  • Top authors: tybulewicz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,210 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.29ms] Passed 4 tests

Analyzing server-side resources used by Single Page Per Category
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.71 ▼3.17
Dashboard /wp-admin3.31 ▲0.0150.30 ▼0.89
Posts /wp-admin/edit.php3.36 ▲0.0148.83 ▼1.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.52 ▼19.83
Media Library /wp-admin/upload.php3.23 ▲0.0036.67 ▲2.05

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
single_page_per_category_version
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Single Page Per Category
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.081.72 ▼0.0144.44 ▲1.86
Dashboard /wp-admin2,195 ▲185.60 ▼0.0885.72 ▼3.0240.48 ▼2.56
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0035.76 ▼5.6135.66 ▼1.13
Add New Post /wp-admin/post-new.php1,535 ▲618.45 ▼4.68639.75 ▲32.7371.56 ▲20.75
Media Library /wp-admin/upload.php1,403 ▲64.18 ▲0.0199.82 ▼1.8942.12 ▼3.16

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • single_page_per_category_version
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: wordpress, plugin, template

single-page-per-category/single-page-per-category.php Passed 13 tests

"Single Page Per Category" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
73 characters long description:
This plugin enables themes to use custom single.php pages for categories.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin47 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3218047

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin