84% monthchunks

Code Review | Monthchunks

WordPress plugin Monthchunks scored84%from 54 tests.

About plugin

  • Plugin page: monthchunks
  • Plugin version: 3.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Sep 29, 2012
  • Latest release: May 11, 2023
  • Number of updates: 26
  • Update frequency: every 149.2 days
  • Top authors: xavivars (61.54%)justincwatt (42.31%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,095 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.36ms] Passed 4 tests

This is a short check of server-side resources used by Monthchunks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0448.53 ▲7.60
Dashboard /wp-admin3.35 ▲0.0448.90 ▲2.80
Posts /wp-admin/edit.php3.40 ▲0.0446.08 ▲1.99
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.04 ▼17.29
Media Library /wp-admin/upload.php3.27 ▲0.0435.56 ▼0.95

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_wp-monthchunks-widget

Browser metrics Passed 4 tests

Checking browser requirements for Monthchunks
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.131.70 ▼0.1842.02 ▼0.72
Dashboard /wp-admin2,206 ▲185.79 ▲0.9297.24 ▼10.9535.85 ▼2.58
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0336.04 ▼4.9432.05 ▼4.30
Add New Post /wp-admin/post-new.php1,542 ▲2318.53 ▼4.60610.63 ▼14.8252.40 ▼2.98
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.0296.84 ▲2.1044.52 ▲5.08

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_wp-monthchunks-widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/monthchunks/monthchunks.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #2, #3 in monthchunks/assets to your readme.txt
You can look at the official readme.txt

monthchunks/monthchunks.php 92% from 13 tests

Analyzing the main PHP file in "Monthchunks" version 3.1.2
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin255 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP36539224
PO File191131

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.50
▷ Minimum class complexity10.00
▷ Maximum class complexity13.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods660.00%
▷ Protected methods00.00%
▷ Private methods440.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png9.53KB4.26KB▼ 55.34%