78% getsale-popup-tool

Code Review | GetSale Popup Tool

WordPress plugin GetSale Popup Tool scored 78% from 54 tests.

About plugin

  • Plugin page: getsale-popup-tool
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.8
  • WordPress version: 6.3.1
  • First release: Sep 20, 2016
  • Latest release: Jul 20, 2017
  • Number of updates: 24
  • Update frequency: every 12.6 days
  • Top authors: getsale (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

50+ active / 2,710 total downloads

Benchmarks

Plugin footprint 83% 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.09MB] [CPU: ▼2.71ms] Passed 4 tests

Analyzing server-side resources used by GetSale Popup Tool
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0843.83 ▼2.24
Dashboard /wp-admin3.40 ▲0.0952.17 ▼3.06
Posts /wp-admin/edit.php3.51 ▲0.1550.78 ▲1.15
Add New Post /wp-admin/post-new.php6.00 ▲0.1189.87 ▼6.68
Media Library /wp-admin/upload.php3.32 ▲0.0940.94 ▲3.27
GetSale /wp-admin/options-general.php?page=getsale_settings3.3035.89

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
getsale_option_name
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for GetSale Popup Tool
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲2713.64 ▲0.591.67 ▼0.0739.40 ▼2.40
Dashboard /wp-admin2,233 ▲275.84 ▲0.01103.55 ▼5.4140.20 ▲2.77
Posts /wp-admin/edit.php2,116 ▲272.00 ▼0.0235.30 ▲0.2036.80 ▲1.35
Add New Post /wp-admin/post-new.php1,537 ▲223.09 ▼0.14626.84 ▼64.9858.97 ▲6.73
Media Library /wp-admin/upload.php1,412 ▲274.26 ▲0.0594.39 ▼21.4341.08 ▼6.51
GetSale /wp-admin/options-general.php?page=getsale_settings8622.1126.7732.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/getsale-popup-tool/getsale_options.php:199
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/getsale-popup-tool/getsale_options.php:199

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=getsale_settings
    • > Network (severe)
    getsale-popup-tooljs/admin.js?ver=6.3.1 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (GetSale Popup Tool plugin), #2 (Widget list in https://getsale.io account), #3 (Widget settings in https://getsale.io account)
You can look at the official readme.txt

getsale-popup-tool/getsale.php 85% from 13 tests

The primary PHP file in "GetSale Popup Tool" version 1.0.5 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("getsale-popup-tool.php" instead of "getsale.php")
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "4.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin683 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP25813330
PO File37378183
JavaScript450140
CSS12019
SVG10011

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/ok.png0.52KB0.51KB▼ 2.06%