84% progress-bar

Code Review | Progress Bar

WordPress plugin Progress Bar scored84%from 54 tests.

About plugin

  • Plugin page: progress-bar
  • Plugin version: 2.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.2.1
  • WordPress version: 6.3.1
  • First release: Feb 10, 2012
  • Latest release: May 18, 2023
  • Number of updates: 55
  • Update frequency: every 74.8 days
  • Top authors: jazzs3quence (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

2,000+ active /57,808 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼6.45ms] Passed 4 tests

A check of server-side resources used by Progress Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1236.56 ▼1.33
Dashboard /wp-admin3.42 ▲0.0848.53 ▼13.18
Posts /wp-admin/edit.php3.47 ▲0.1247.20 ▲1.67
Add New Post /wp-admin/post-new.php6.00 ▲0.1289.88 ▼12.96
Media Library /wp-admin/upload.php3.34 ▲0.1237.12 ▲3.35

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

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

Browser metrics Passed 4 tests

Progress Bar: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲14113.96 ▼0.428.05 ▲6.1541.22 ▼2.10
Dashboard /wp-admin2,206 ▲185.79 ▼0.0798.96 ▼16.4339.31 ▼6.19
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0241.03 ▲4.6433.53 ▲0.60
Add New Post /wp-admin/post-new.php1,533 ▲1423.38 ▲0.08635.05 ▼36.3855.07 ▲3.20
Media Library /wp-admin/upload.php1,382 ▼64.21 ▼0.0296.89 ▼7.7944.04 ▼0.03

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_wppb-widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/progress-bar/wppb-widget.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/progress-bar/wp-progress-bar.php:29

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 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: progress, progress bar, shortcode, css3

progress-bar/wp-progress-bar.php 92% from 13 tests

This is the main PHP file of "Progress Bar" version 2.2.3, 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: The principal plugin file should be the same as the plugin slug ("progress-bar.php" instead of "wp-progress-bar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin789 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP360233573
CSS12138174
XML22032
JavaScript10010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity7.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin