84% wp-most-popular

Code Review | WP Most Popular

WordPress plugin WP Most Popular scored 84% from 54 tests.

About plugin

  • Plugin page: wp-most-popular
  • Plugin version: 0.3.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Jan 24, 2012
  • Latest release: Aug 7, 2018
  • Number of updates: 17
  • Update frequency: every 140.4 days
  • Top authors: MattGeri (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

3,000+ active / 75,416 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
This plugin's installer ran successfully

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

A check of server-side resources used by WP Most Popular
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.23 ▼4.10
Dashboard /wp-admin3.32 ▲0.0243.07 ▼6.01
Posts /wp-admin/edit.php3.37 ▲0.0249.73 ▲1.46
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.11 ▼5.68
Media Library /wp-admin/upload.php3.24 ▲0.0237.74 ▲2.19

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: 1 new table, 7 new options
New tables
wp_most_popular
New WordPress options
widget_recent-comments
widget_wmp_widget
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Most Popular
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲16913.58 ▼1.035.07 ▲2.6239.93 ▼6.97
Dashboard /wp-admin2,206 ▲185.90 ▲1.00109.13 ▼13.2241.70 ▼4.58
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0140.17 ▲6.6136.23 ▲0.04
Add New Post /wp-admin/post-new.php1,513 ▼2017.72 ▼5.40593.76 ▼55.0451.20 ▲1.49
Media Library /wp-admin/upload.php1,388 ▼04.23 ▼0.0495.79 ▼3.0041.27 ▼3.37

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_wmp_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-most-popular/wp-most-popular.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-most-popular/system/widget.php:2

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: popular, best posts, most viewed posts, most view posts widget, popular custom type posts...

wp-most-popular/wp-most-popular.php Passed 13 tests

Analyzing the main PHP file in "WP Most Popular" version 0.3.1
62 characters long description:
Flexible plugin to show your most popular posts based on views

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin325 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP55544325

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.25
▷ Minimum class complexity2.00
▷ Maximum class complexity26.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods844.44%
▷ Public methods1372.22%
▷ Protected methods00.00%
▷ Private methods527.78%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin