10% tdd-progress-bar

Code Review | TDD Progress Bar

WordPress plugin TDD Progress Bar scored10%from 54 tests.

About plugin

  • Plugin page: tdd-progress-bar
  • Plugin version: 0.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.3.1
  • WordPress version: 6.3.1
  • First release: Nov 18, 2011
  • Latest release: Jun 2, 2012
  • Number of updates: 46
  • Update frequency: every 4.3 days
  • Top authors: taylorde (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active /8,283 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/tdd-progress-bar/tdd-progress-bar.php+52
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.68MB] [CPU: ▼44.74ms] Passed 4 tests

This is a short check of server-side resources used by TDD Progress Bar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.30 ▼1.169.22 ▼29.31
Dashboard /wp-admin2.32 ▼0.9811.85 ▼34.24
Posts /wp-admin/edit.php2.32 ▼1.0310.62 ▼34.77
Add New Post /wp-admin/post-new.php2.32 ▼3.5612.07 ▼80.64
Media Library /wp-admin/upload.php2.32 ▼0.9110.85 ▼21.35
Progress Bars /wp-admin/edit.php?post_type=tdd_pb2.3211.79
Add New Progress Bar /wp-admin/post-new.php?post_type=tdd_pb2.3212.12
Settings /wp-admin/edit.php?post_type=tdd_pb&page=settings2.3210.94

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 47 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
tdd_pb_options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_tdd_progress_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for TDD Progress Bar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲15313.53 ▼1.028.32 ▲6.4143.44 ▲4.12
Dashboard /wp-admin2,233 ▲595.64 ▲0.0391.02 ▲3.3538.05 ▼2.56
Posts /wp-admin/edit.php2,135 ▲382.02 ▲0.0138.84 ▲1.8037.22 ▲0.96
Add New Post /wp-admin/post-new.php1,565 ▲3818.19 ▼4.97606.61 ▼68.3349.04 ▼0.32
Media Library /wp-admin/upload.php1,429 ▲324.41 ▲0.20100.85 ▼5.1841.23 ▼3.72
Progress Bars /wp-admin/edit.php?post_type=tdd_pb1,1181.9232.5631.23
Add New Progress Bar /wp-admin/post-new.php?post_type=tdd_pb1,6612.5350.7557.20
Settings /wp-admin/edit.php?post_type=tdd_pb&page=settings9262.0525.9130.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in TDD_Progress_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_tdd_progress_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=tdd_pb&page=settings
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in TDD_Progress_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/edit.php?post_type=tdd_pb&page=settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/edit.php?post_type=tdd_pb&page=settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/edit.php?post_type=tdd_pb&page=settings
    • > Warning in wp-admin/includes/template.php+1824
    call_user_func() expects parameter 1 to be a valid callback, class 'TDD_PB_Admin_Settings' does not have a method 'setting_css'

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tdd-progress-bar/tdd-progress-bar.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/tdd-progress-bar/inc/admin.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tdd-progress-bar/inc/widget.php:10

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 errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (A Progress Bar "race"), #2 (Progress Bar management page showing all the colors available), #3 (A solo Progress Bar), #4 (Bar Options)
Please take inspiration from this readme.txt

tdd-progress-bar/tdd-progress-bar.php Passed 13 tests

The principal PHP file in "TDD Progress Bar" v. 0.5.2 is loaded by WordPress automatically on each request
32 characters long description:
Manage and display progress bars

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
Good job! No executable or dangerous file extensions detected7,361 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
HTML37702,717
JavaScript83141342,201
CoffeeScript4279121,021
PHP4160178689
CSS53716541
Markdown351089
PO File1353585
JSON10018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity8.00
▷ Minimum class complexity5.00
▷ Maximum class complexity11.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 0.70MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/chosen/chosen/chosen-sprite.png0.55KB0.70KB0.00%
images/bars_overlay.png38.23KB20.68KB▼ 45.91%
js/miniColors/images/gradient.png10.11KB8.24KB▼ 18.50%
screenshot-1.png30.17KB8.66KB▼ 71.30%
screenshot-4.png69.02KB19.93KB▼ 71.13%