84% rs-custom-popup

Code Review | RS Custom Popup

WordPress plugin RS Custom Popup scored84%from 54 tests.

About plugin

  • Plugin page: rs-custom-popup
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2
  • WordPress version: 6.3.1
  • First release: Apr 22, 2014
  • Latest release: Apr 20, 2015
  • Number of updates: 7
  • Update frequency: every 54.0 days
  • Top authors: rorystandley (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /974 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.06MB] [CPU: ▼0.12ms] Passed 4 tests

An overview of server-side resources used by RS Custom Popup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0543.78 ▲0.09
Dashboard /wp-admin3.36 ▲0.0660.05 ▲8.26
Posts /wp-admin/edit.php3.48 ▲0.1250.39 ▲1.31
Add New Post /wp-admin/post-new.php5.95 ▲0.0693.00 ▼3.60
Media Library /wp-admin/upload.php3.29 ▲0.0637.24 ▲1.72

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 55 new files
Database: 1 new table, 7 new options
New tables
wp_rs_custom_popup
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
rscustompopup_db_version
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by RS Custom Popup
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲12913.47 ▼0.809.52 ▲7.4741.94 ▲0.82
Dashboard /wp-admin2,195 ▲155.55 ▼0.1096.58 ▲11.7485.17 ▲42.22
Posts /wp-admin/edit.php2,115 ▲151.98 ▼0.0238.88 ▲2.4234.60 ▼2.40
Add New Post /wp-admin/post-new.php1,692 ▲15722.35 ▲4.20727.18 ▲98.6047.02 ▼18.88
Media Library /wp-admin/upload.php1,412 ▲124.12 ▼0.08105.67 ▼1.5981.63 ▲34.26

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/rs-custom-popup/admin/views/admin.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/rs-custom-popup/public/views/public.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Contributors: Contributors not specified
Please take inspiration from this readme.txt

rs-custom-popup/rs-custom-popup.php Passed 13 tests

This is the main PHP file of "RS Custom Popup" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
49 characters long description:
A plugin that allows you to create your own popup

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
Good job! No executable or dangerous file extensions detected1,180 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32419620
PHP910988390
CSS302170

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.00
▷ Minimum class complexity2.00
▷ Maximum class complexity11.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods822.86%
▷ Public methods2982.86%
▷ Protected methods00.00%
▷ Private methods617.14%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
24 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/custom_hsb_h.png0.95KB0.73KB▼ 23.40%
admin/assets/images/custom_rgb_r.png0.99KB0.74KB▼ 25.34%
admin/assets/images/custom_rgb_g.png1.04KB0.80KB▼ 23.67%
admin/assets/images/select.png0.49KB0.33KB▼ 33.40%
admin/assets/images/custom_hsb_s.png1.14KB0.89KB▼ 21.75%