84% most-commented-posts-3

Code Review | Most Commented Posts

WordPress plugin Most Commented Posts scored84%from 54 tests.

About plugin

  • Plugin page: most-commented-po...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.1.1
  • WordPress version: 6.3.1
  • First release: Dec 31, 2012
  • Latest release: Apr 28, 2019
  • Number of updates: 7
  • Update frequency: every 329.9 days
  • Top authors: MoreSympathy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,628 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
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Most Commented Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.75 ▼4.67
Dashboard /wp-admin3.33 ▲0.0351.03 ▲3.98
Posts /wp-admin/edit.php3.38 ▲0.0248.04 ▲0.84
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.68 ▼11.45
Media Library /wp-admin/upload.php3.26 ▲0.0234.07 ▲2.35

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_pd-mostcommentedposts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Most Commented Posts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.20 ▼1.451.82 ▲0.0643.71 ▲2.57
Dashboard /wp-admin2,206 ▲185.78 ▼0.0697.59 ▼3.9143.31 ▼1.82
Posts /wp-admin/edit.php2,089 ▼02.13 ▲0.0940.12 ▲5.3937.13 ▼0.01
Add New Post /wp-admin/post-new.php1,519 ▼023.03 ▼0.08642.47 ▼29.9755.37 ▼7.81
Media Library /wp-admin/upload.php1,391 ▲34.20 ▲0.0194.50 ▼11.8644.11 ▲0.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_pd-mostcommentedposts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/most-commented-posts-3/plugin.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues 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
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Twenty Sixteen Screenshot), #2 (Twenty Seventeen Screenshot), #3 (Customizer Screenshot)
The official readme.txt might help

most-commented-posts-3/plugin.php 92% from 13 tests

"Most Commented Posts" version 1.1.1'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:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("most-commented-posts-3.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin161 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1292094
PO File2121259
CSS1408

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.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.11MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png60.14KB23.92KB▼ 60.23%
screenshot-2.png53.70KB23.17KB▼ 56.86%