84% gr-progress

Code Review | GR Progress Widget

WordPress plugin GR Progress Widget scored84%from 54 tests.

About plugin

  • Plugin page: gr-progress
  • Plugin version: 1.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.0
  • WordPress version: 6.3.1
  • First release: May 27, 2016
  • Latest release: Dec 10, 2018
  • Number of updates: 25
  • Update frequency: every 37.1 days
  • Top authors: cmeeren (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

400+ active /9,697 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by GR Progress Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.28 ▼9.01
Dashboard /wp-admin3.32 ▲0.0250.40 ▼4.48
Posts /wp-admin/edit.php3.44 ▲0.0849.19 ▼1.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.28 ▼6.82
Media Library /wp-admin/upload.php3.24 ▲0.0139.40 ▲2.46

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_gr_progress_cvdm_widget
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by GR Progress Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.28 ▼0.091.69 ▼0.0343.63 ▲1.03
Dashboard /wp-admin2,200 ▲235.69 ▲0.0287.41 ▼10.2639.50 ▼4.87
Posts /wp-admin/edit.php2,102 ▲52.01 ▼0.0034.60 ▼0.2835.00 ▼1.95
Add New Post /wp-admin/post-new.php1,528 ▼1323.05 ▼0.03682.32 ▲26.4263.84 ▲5.85
Media Library /wp-admin/upload.php1,399 ▼14.21 ▼0.03121.88 ▲15.1047.62 ▲0.99

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_gr_progress_cvdm_widget
    • widget_recent-posts
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/gr-progress/gr-progress-widget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/gr-progress/gr-progress-widget.php:7

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 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
4 plugin tags: reading, reading lists, books, goodreads

gr-progress/gr-progress.php Passed 13 tests

The entry point to "GR Progress Widget" version 1.5.5 is a PHP file that has certain tags in its header comment area
53 characters long description:
Displays shelves and reading progress from Goodreads.

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 detected2,326 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP83442922,209
CSS146117

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity46.89
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes9
▷ Abstract classes222.22%
▷ Concrete classes777.78%
▷ Final classes00.00%
Methods147
▷ Static methods64.08%
▷ Public methods9866.67%
▷ Protected methods1610.88%
▷ Private methods3322.45%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants26
▷ Global constants2180.77%
▷ Class constants519.23%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected