10% sb-popular-posts-tabbed-widget

Code Review | SB Popular Posts Tabbed Widget

WordPress plugin SB Popular Posts Tabbed Widget scored10%from 54 tests.

About plugin

  • Plugin page: sb-popular-posts-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2
  • WordPress version: 6.3.1
  • First release: Jun 19, 2013
  • Latest release: May 23, 2015
  • Number of updates: 4
  • Update frequency: every 175.8 days
  • Top authors: scottopolis (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /14,004 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/sb-popular-posts-tabbed-widget/sb-pop-posts-widget.php+22
    Methods with the same name as their class will not be constructors in a future version of PHP; sb_tabbed_widget has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼49.68ms] Passed 4 tests

A check of server-side resources used by SB Popular Posts Tabbed Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.45 ▼38.37
Dashboard /wp-admin2.11 ▼1.196.12 ▼41.68
Posts /wp-admin/edit.php2.11 ▼1.255.34 ▼38.69
Add New Post /wp-admin/post-new.php2.11 ▼3.785.66 ▼79.96
Media Library /wp-admin/upload.php2.11 ▼1.126.22 ▼27.43

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for SB Popular Posts Tabbed Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.63 ▼0.745.74 ▲4.0439.05 ▼2.95
Dashboard /wp-admin2,206 ▲155.81 ▲0.9698.70 ▼9.5541.36 ▲0.53
Posts /wp-admin/edit.php2,089 ▲32.02 ▼0.0236.05 ▲1.8332.30 ▼2.95
Add New Post /wp-admin/post-new.php1,535 ▲723.23 ▼0.02720.51 ▲42.4649.12 ▼3.06
Media Library /wp-admin/upload.php1,388 ▼04.27 ▼0.0097.50 ▼0.8042.81 ▼0.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/sb-popular-posts-tabbed-widget/sb-pop-posts-widget.php+22
    Methods with the same name as their class will not be constructors in a future version of PHP; sb_tabbed_widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_sb_tabbed_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_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
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 fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sb-popular-posts-tabbed-widget/includes/scripts.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sb-popular-posts-tabbed-widget/includes/scripts.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Contributors: The plugin contributors field is not present
Please take inspiration from this readme.txt

sb-popular-posts-tabbed-widget/sb-pop-posts-widget.php 92% from 13 tests

This is the main PHP file of "SB Popular Posts Tabbed Widget" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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 ("sb-popular-posts-tabbed-widget.php" instead of "sb-pop-posts-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected235 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25324132
CSS1141291
JavaScript11212

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity17.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%
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

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/images/default-thumb.png6.09KB5.08KB▼ 16.63%