84% rescue-children-banner

Code Review | Rescue Children Banner

WordPress plugin Rescue Children Banner scored84%from 54 tests.

About plugin

  • Plugin page: rescue-children-b...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.2
  • WordPress version: 6.3.1
  • First release: Feb 11, 2014
  • Latest release: Apr 23, 2015
  • Number of updates: 6
  • Update frequency: every 90.3 days
  • Top authors: iandunn (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.03ms] Passed 4 tests

Analyzing server-side resources used by Rescue Children Banner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.50 ▲1.94
Dashboard /wp-admin3.35 ▲0.0554.09 ▲1.65
Posts /wp-admin/edit.php3.47 ▲0.1152.06 ▲0.01
Add New Post /wp-admin/post-new.php5.93 ▲0.0587.93 ▼7.72
Media Library /wp-admin/upload.php3.28 ▲0.0537.51 ▲2.72
Rescue Children Banner /wp-admin/options-general.php?page=rcb_settings3.2434.62

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Rescue Children Banner
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲15414.00 ▼0.386.03 ▲3.6841.80 ▼2.09
Dashboard /wp-admin2,213 ▲254.81 ▼0.05115.13 ▲12.9442.56 ▲1.10
Posts /wp-admin/edit.php2,096 ▲72.02 ▼0.0136.16 ▼3.4635.24 ▼2.72
Add New Post /wp-admin/post-new.php1,517 ▼1917.41 ▼5.80657.74 ▼30.0953.48 ▼2.33
Media Library /wp-admin/upload.php1,392 ▲74.22 ▼0.00104.28 ▲2.0348.78 ▲2.32
Rescue Children Banner /wp-admin/options-general.php?page=rcb_settings8612.0428.0027.45

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
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
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/rescue-children-banner/views/requirements-not-met.php:5
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/rescue-children-banner/views/setting-fields.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/rescue-children-banner/views/settings.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rescue-children-banner/views/setting-fields.php on line 20
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rescue-children-banner/views/setting-fields.php on line 1
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/rescue-children-banner/views/setting-fields.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rescue-children-banner/views/setting-fields.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/rescue-children-banner/views/banner-markup.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/rescue-children-banner/bootstrap.php:13
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/rescue-children-banner/views/setting-fields.php on line 10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

rescue-children-banner/bootstrap.php 92% from 13 tests

"Rescue Children Banner" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("rescue-children-banner.php" instead of "bootstrap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin275 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP75171219
CSS18146
JavaScript11110

PHP code Passed 2 tests

This is a very shot 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.22
Average class complexity4.50
▷ Minimum class complexity3.00
▷ Maximum class complexity6.00
Average method complexity1.54
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/rescue-children-top-right.png17.22KB7.88KB▼ 54.21%
images/rescue-children-top-left.png15.80KB7.90KB▼ 50.02%
images/add-to-website.png1.79KB1.76KB▼ 1.80%