83% sales-page-stats

Code Review | Sales Page Stats

WordPress plugin Sales Page Stats scored83%from 54 tests.

About plugin

  • Plugin page: sales-page-stats
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Nov 30, 2013
  • Latest release: Feb 3, 2014
  • Number of updates: 7
  • Update frequency: every 9.4 days
  • Top authors: yenkyphp (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,047 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.70MB] [CPU: ▼25.92ms] Passed 4 tests

Analyzing server-side resources used by Sales Page Stats
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0332.61 ▼10.18
Dashboard /wp-admin3.32 ▼0.0247.25 ▼18.99
Posts /wp-admin/edit.php3.37 ▲0.0245.74 ▼8.16
Add New Post /wp-admin/post-new.php3.11 ▼2.7836.29 ▼66.34
Media Library /wp-admin/upload.php3.25 ▲0.0233.07 ▼4.10

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: 1 new table, 6 new options
New tables
wp_page_stats
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sales Page Stats
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲12813.44 ▼0.9711.03 ▲9.3330.73 ▼14.56
Dashboard /wp-admin2,195 ▲155.63 ▼0.0394.63 ▼3.6142.36 ▼1.04
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0738.70 ▲4.8233.69 ▼4.50
Add New Post /wp-admin/post-new.php6,331 ▲4,80326.25 ▲2.87915.11 ▲292.2461.47 ▲11.49
Media Library /wp-admin/upload.php1,400 ▼04.27 ▲0.04102.49 ▼5.5542.39 ▼2.02

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/sales-page-stats/tem.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sales-page-stats/salesPage.php:16

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Page Metabox)
  • Screenshots: Please a description for screenshot #0 in sales-page-stats/assets to your readme.txt
The official readme.txt might help

sales-page-stats/salesPage.php 85% from 13 tests

"Sales Page Stats" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 154 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("sales-page-stats.php" instead of "salesPage.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin260 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP210418246
SQL10014

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin