68% sales-cheater

Code Review | Sales Cheater

WordPress plugin Sales Cheater scored68%from 54 tests.

About plugin

  • Plugin page: sales-cheater
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.4.1
  • WordPress version: 6.3.1
  • First release: Nov 12, 2012
  • Latest release: Nov 12, 2012
  • Number of updates: 12
  • Update frequency: every 0.1 days
  • Top authors: queeez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /830 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.22ms] Passed 4 tests

This is a short check of server-side resources used by Sales Cheater
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0567.14 ▲19.95
Dashboard /wp-admin3.33 ▼0.0151.12 ▼10.29
Posts /wp-admin/edit.php3.38 ▲0.0348.02 ▼3.42
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.55 ▼14.88
Media Library /wp-admin/upload.php3.26 ▲0.0342.19 ▲3.71
Maintainance /wp-admin/admin.php?page=sales-cheater/salescheater-maintainance.php3.2330.57
Uninstall /wp-admin/admin.php?page=sales-cheater/salescheater-uninstall.php3.2334.02
Settings /wp-admin/admin.php?page=sales-cheater/salescheater-settings.php3.2631.57

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: 1 new table, 12 new options
New tables
wp_salescheater
New WordPress options
widget_recent-comments
theysaidso_admin_options
sc_minute
db_upgraded
sc_min
widget_theysaidso_widget
sc_template_text
sc_autodelentries
sc_max
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by Sales Cheater
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7014.20 ▼0.151.86 ▲0.0246.56 ▼4.18
Dashboard /wp-admin2,223 ▲495.62 ▲0.0182.85 ▼11.6839.47 ▼0.68
Posts /wp-admin/edit.php2,128 ▲281.99 ▼0.0135.53 ▲1.0234.13 ▼3.47
Add New Post /wp-admin/post-new.php1,553 ▲2523.24 ▲0.19664.91 ▼39.3658.81 ▲5.17
Media Library /wp-admin/upload.php1,431 ▲314.16 ▲0.0196.92 ▼12.5144.30 ▼5.11
Maintainance /wp-admin/admin.php?page=sales-cheater/salescheater-maintainance.php8602.0325.3828.72
Uninstall /wp-admin/admin.php?page=sales-cheater/salescheater-uninstall.php9051.9922.0026.02
Settings /wp-admin/admin.php?page=sales-cheater/salescheater-settings.php9161.9922.4724.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables detected upon uninstall: 1 table
    • wp_salescheater
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • sc_template_text
    • sc_autodelentries
    • can_compress_scripts
    • sc_max
    • sc_minute
    • db_upgraded
    • sc_min
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=sales-cheater/salescheater-maintainance.php
    • > Notice in wp-content/plugins/sales-cheater/salescheater-maintainance.php+24
    Undefined index: sc_dbdelete
    • > GET request to /wp-admin/admin.php?page=sales-cheater/salescheater-maintainance.php
    • > Notice in wp-content/plugins/sales-cheater/salescheater-maintainance.php+30
    Undefined index: sc_saveauto
    • > GET request to /wp-admin/admin.php?page=sales-cheater/salescheater-uninstall.php
    • > Notice in wp-content/plugins/sales-cheater/salescheater-uninstall.php+27
    Undefined index: mode
    • > GET request to /wp-admin/admin.php?page=sales-cheater/salescheater-settings.php
    • > Notice in wp-content/plugins/sales-cheater/salescheater-settings.php+24
    Undefined index: sc_submit
    • > GET request to /wp-admin/admin.php?page=sales-cheater/salescheater-settings.php
    • > Notice in wp-content/plugins/sales-cheater/salescheater-settings.php+127
    Undefined index: evaluate

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
Please fix the following items
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Creating default object from empty value in wp-content/plugins/sales-cheater/salescheater.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/sales-cheater/salescheater-settings.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/sales-cheater/salescheater-uninstall.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sales-cheater/salescheater.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/sales-cheater/salescheater-maintainance.php:19
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/sales-cheater/salescheater.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Admin - Settings Menu), #2 (Admin - Maintainance Menu), #3 (Admin - Unintstall Menu), #4 (How to insert code into an article), #5 (Output Example)
Please take inspiration from this readme.txt

sales-cheater/salescheater.php 92% from 13 tests

The main PHP file in "Sales Cheater" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("sales-cheater.php" instead of "salescheater.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin404 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP48189404

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
5 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png10.20KB4.86KB▼ 52.37%
screenshot-3.png16.38KB6.33KB▼ 61.36%
screenshot-1.png22.10KB6.66KB▼ 69.88%
screenshot-5.png2.83KB0.86KB▼ 69.43%
screenshot-2.png11.48KB4.07KB▼ 64.51%