84% category-archives

Code Review | Category Archives

WordPress plugin Category Archives scored84%from 54 tests.

About plugin

  • Plugin page: category-archives
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.5
  • WordPress version: 6.3.1
  • First release: Apr 23, 2016
  • Latest release: Nov 19, 2016
  • Number of updates: 9
  • Update frequency: every 23.3 days
  • Top authors: s-hiroshi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,209 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.66ms] Passed 4 tests

Server-side resources used by Category Archives
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.66 ▼0.24
Dashboard /wp-admin3.33 ▲0.0255.40 ▲5.94
Posts /wp-admin/edit.php3.38 ▲0.0253.32 ▼1.23
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.32 ▼15.11
Media Library /wp-admin/upload.php3.25 ▲0.0238.01 ▲7.86

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_categoryarchiveswidget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Category Archives
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.322.05 ▲0.0044.46 ▲0.94
Dashboard /wp-admin2,195 ▲185.65 ▲0.1190.30 ▲1.7240.23 ▼1.09
Posts /wp-admin/edit.php2,097 ▼01.97 ▲0.0034.97 ▼3.1029.80 ▼6.05
Add New Post /wp-admin/post-new.php1,526 ▼323.69 ▼0.06699.05 ▲66.2155.09 ▼12.10
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0196.96 ▼9.8346.68 ▲4.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_categoryarchiveswidget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/category-archives/category-archives-form-view.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/category-archives/class.category-archives-widget.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/category-archives/class.category-archives-widget.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: archive, year, month, links, category

category-archives/category-archives.php 92% from 13 tests

"Category Archives" version 0.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected305 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP433121268
PO File261637

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity14.00
▷ Minimum class complexity7.00
▷ Maximum class complexity21.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods562.50%
▷ Protected methods00.00%
▷ Private methods337.50%
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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.23MB with 0.16MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png110.87KB37.40KB▼ 66.27%
screenshot-1.png125.44KB39.63KB▼ 68.41%