84% crazyrocket-pop-ups

Code Review | Spin Wheel Pop Up

WordPress plugin Spin Wheel Pop Up scored84%from 54 tests.

About plugin

  • Plugin page: crazyrocket-pop-ups
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 2, 2018
  • Latest release: Oct 5, 2023
  • Number of updates: 46
  • Update frequency: every 38.4 days
  • Top authors: crazyrocket (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /7,581 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Spin Wheel Pop Up
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0541.00 ▲2.37
Dashboard /wp-admin3.37 ▲0.0247.30 ▼16.35
Posts /wp-admin/edit.php3.42 ▲0.0644.30 ▼0.60
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.31 ▼9.33
Media Library /wp-admin/upload.php3.29 ▲0.0638.75 ▲4.39

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Spin Wheel Pop Up: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.25 ▼0.361.68 ▲0.0643.84 ▲4.93
Dashboard /wp-admin2,210 ▲305.58 ▼0.0886.48 ▲1.6280.14 ▲40.06
Posts /wp-admin/edit.php2,112 ▲121.97 ▲0.0334.53 ▼4.1432.87 ▼4.43
Add New Post /wp-admin/post-new.php1,693 ▲16522.34 ▼0.74685.34 ▲13.5650.64 ▼13.06
Media Library /wp-admin/upload.php1,418 ▲184.33 ▲0.1194.73 ▲0.7580.83 ▲37.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/crazyrocket-pop-ups/crazyrocket.php:21

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: wheel, fortune wheel, pop up, wordpress popup, popup...

crazyrocket-pop-ups/crazyrocket.php 92% from 13 tests

This is the main PHP file of "Spin Wheel Pop Up" version 2.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("crazyrocket-pop-ups.php" instead of "crazyrocket.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 plugin316 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15622316

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity8.33
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/crazyrocket-icon.png1.92KB0.98KB▼ 49.08%
images/logo-small.png6.96KB3.74KB▼ 46.21%