84% category-monthly-archives

Code Review | Category Monthly Archives

WordPress plugin Category Monthly Archives scored84%from 54 tests.

About plugin

  • Plugin page: category-monthly-...
  • Plugin version: 0.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.3
  • WordPress version: 6.3.1
  • First release: Aug 27, 2015
  • Latest release: Nov 11, 2015
  • Number of updates: 8
  • Update frequency: every 9.5 days
  • Top authors: s-hiroshi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,300 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Category Monthly Archives
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0243.36 ▲0.55
Dashboard /wp-admin3.33 ▲0.0252.07 ▼4.37
Posts /wp-admin/edit.php3.38 ▲0.0247.83 ▼6.52
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.62 ▼9.34
Media Library /wp-admin/upload.php3.25 ▲0.0237.64 ▼0.02

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_categorymonthlyarchives
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Category Monthly Archives
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.501.76 ▲0.1545.03 ▲4.19
Dashboard /wp-admin2,195 ▲155.60 ▼0.0790.58 ▲2.3241.56 ▼0.99
Posts /wp-admin/edit.php2,103 ▲31.99 ▲0.0435.85 ▼3.3132.98 ▼1.42
Add New Post /wp-admin/post-new.php1,526 ▼1123.61 ▲5.36611.42 ▼8.0148.37 ▼20.50
Media Library /wp-admin/upload.php1,400 ▲94.22 ▲0.05103.85 ▲0.8749.11 ▲6.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_categorymonthlyarchives

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/category-monthly-archives/class-category-monthly-archives.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/category-monthly-archives/class.category-monthly-archives.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/category-monthly-archives/category-monthly-archives-form-view.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/category-monthly-archives/class.category-monthly-archives.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: links, monthly, archive, category

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

The principal PHP file in "Category Monthly Archives" v. 0.0.3 is loaded by WordPress automatically on each request
Please take the time to 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 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin424 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP546151373
PO File2122251

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity13.67
▷ Minimum class complexity7.00
▷ Maximum class complexity20.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods969.23%
▷ Protected methods00.00%
▷ Private methods430.77%
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

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.23MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot1.png90.70KB90.40KB0.33%
screenshot2.png147.19KB53.86KB▼ 63.41%