90% surpriseme

Code Review | surpriseme

WordPress plugin surpriseme scored90%from 54 tests.

About plugin

  • Plugin page: surpriseme
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Feb 6, 2017
  • Latest release: Mar 20, 2017
  • Number of updates: 7
  • Update frequency: every 5.9 days
  • Top authors: surpriseme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /662 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.06ms] Passed 4 tests

An overview of server-side resources used by surpriseme
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.10 ▲2.34
Dashboard /wp-admin3.33 ▲0.0350.13 ▼8.49
Posts /wp-admin/edit.php3.45 ▲0.0951.61 ▼2.89
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.39 ▼23.87
Media Library /wp-admin/upload.php3.26 ▲0.0335.67 ▼0.99

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
smart_coupons_is_send_email
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for surpriseme
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.39 ▼0.292.25 ▲0.5244.46 ▼1.77
Dashboard /wp-admin2,195 ▲185.64 ▼0.0589.07 ▼11.4743.02 ▼6.44
Posts /wp-admin/edit.php2,100 ▼02.14 ▲0.1535.66 ▲1.6835.67 ▼1.52
Add New Post /wp-admin/post-new.php1,526 ▼1917.55 ▼5.65696.96 ▲49.4753.86 ▲1.24
Media Library /wp-admin/upload.php1,397 ▲34.43 ▲0.20102.52 ▼0.8844.75 ▲0.02

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • smart_coupons_is_send_email
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

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
3 plugin tags: woocommerce, gutscheine, geschenke

surpriseme/surpriseme.php 92% from 13 tests

This is the main PHP file of "surpriseme" version 1.0.1, 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:
  • Description: Make the plugin description longer than 10 characters (currently 0 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin752 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP420865752

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity22.50
▷ Minimum class complexity14.00
▷ Maximum class complexity38.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods59
▷ Static methods23.39%
▷ Public methods4779.66%
▷ Protected methods00.00%
▷ Private methods1220.34%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin