10% most-popular-posts-widget-lite

Code Review | Most Popular Posts Widget

WordPress plugin Most Popular Posts Widget scored10%from 54 tests.

About plugin

  • Plugin page: most-popular-post...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-4.3
  • WordPress version: 6.3.1
  • First release: Jan 16, 2015
  • Latest release: Sep 19, 2015
  • Number of updates: 22
  • Update frequency: every 11.2 days
  • Top authors: Piotr Pesta (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /4,808 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/most-popular-posts-widget-lite/pp-popular-posts.php+40
    Methods with the same name as their class will not be constructors in a future version of PHP; popular_posts_statistics has a deprecated constructor

Server metrics [RAM: ▼1.83MB] [CPU: ▼51.27ms] Passed 4 tests

Server-side resources used by Most Popular Posts Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.315.14 ▼38.24
Dashboard /wp-admin2.18 ▼1.138.49 ▼46.94
Posts /wp-admin/edit.php2.18 ▼1.186.61 ▼42.81
Add New Post /wp-admin/post-new.php2.18 ▼3.717.05 ▼77.09
Media Library /wp-admin/upload.php2.18 ▼1.054.87 ▼34.03

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: 1 new table, 7 new options
New tables
wp_popular_posts_statistics
New WordPress options
widget_recent-posts
widget_popular_posts_statistics
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Most Popular Posts Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲5613.18 ▼1.221.96 ▼0.0442.66 ▼4.47
Dashboard /wp-admin2,206 ▲156.05 ▲0.17106.33 ▼11.0140.14 ▼7.28
Posts /wp-admin/edit.php2,089 ▼02.13 ▲0.0734.50 ▼3.5333.95 ▼0.70
Add New Post /wp-admin/post-new.php1,528 ▲923.41 ▲0.18688.85 ▼17.5258.91 ▲7.51
Media Library /wp-admin/upload.php1,382 ▼94.30 ▲0.1199.33 ▼7.8543.76 ▼1.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
    • > Deprecated in wp-content/plugins/most-popular-posts-widget-lite/pp-popular-posts.php+40
    Methods with the same name as their class will not be constructors in a future version of PHP; popular_posts_statistics has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | 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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/most-popular-posts-widget-lite/pp-popular-posts.php:14

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: pupularity, visits, pupular, widget, bars...

most-popular-posts-widget-lite/pp-popular-posts.php 92% from 13 tests

Analyzing the main PHP file in "Most Popular Posts Widget" version 1.2.0
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("most-popular-posts-widget-lite.php" instead of "pp-popular-posts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected942 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS7583589
PHP34624353

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity51.00
▷ Minimum class complexity51.00
▷ Maximum class complexity51.00
Average method complexity13.50
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
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
No PNG files were detected