74% charterpad-widgets

Code Review | CharterPad Widgets

WordPress plugin CharterPad Widgets scored74%from 54 tests.

About plugin

  • Plugin page: charterpad-widgets
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.9
  • WordPress version: 6.3.1
  • First release: Jan 21, 2022
  • Latest release: Feb 2, 2022
  • Number of updates: 7
  • Update frequency: every 1.9 days
  • Top authors: charterpad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /361 total downloads


Plugin footprint 65% 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: ▼1.81MB] [CPU: ▼50.00ms] Passed 4 tests

An overview of server-side resources used by CharterPad Widgets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.285.81 ▼33.24
Dashboard /wp-admin2.20 ▼1.107.20 ▼42.51
Posts /wp-admin/edit.php2.20 ▼1.166.11 ▼41.34
Add New Post /wp-admin/post-new.php2.20 ▼3.696.71 ▼82.90
Media Library /wp-admin/upload.php2.20 ▼1.036.83 ▼27.28

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by CharterPad Widgets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.96 ▼0.391.85 ▲0.0945.55 ▲3.87
Dashboard /wp-admin2,228 ▲515.57 ▼0.0992.59 ▲5.3237.34 ▼5.78
Posts /wp-admin/edit.php2,135 ▲382.02 ▼0.0236.31 ▲0.9634.61 ▲2.65
Add New Post /wp-admin/post-new.php1,694 ▲16822.19 ▼0.70599.45 ▼21.8661.28 ▲4.90
Media Library /wp-admin/upload.php1,439 ▲364.25 ▲0.02115.92 ▲7.5948.06 ▲3.88

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the cpwidget5236_admin_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

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 | 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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/charterpad-widgets/charterpad-widgets.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found


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
5 plugin tags: trips availability, charterpad, widgets, quote, availability

charterpad-widgets/charterpad-widgets.php 92% from 13 tests

The principal PHP file in "CharterPad Widgets" v. 1.0.5 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 188 characters long)

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
Everything looks great! No dangerous files found in this plugin355 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions26100.00%
▷ Anonymous functions00.00%
▷ 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
No PNG files were detected