10% easypromos

Code Review | Easypromos Plugin

WordPress plugin Easypromos Plugin scored10%from 54 tests.

About plugin

  • Plugin page: easypromos
  • Plugin version: 1.3.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1
  • WordPress version: 6.3.1
  • First release: Jan 21, 2021
  • Latest release: Sep 1, 2023
  • Number of updates: 33
  • Update frequency: every 30.1 days
  • Top authors: easypromosapp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,440 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/easypromos/easypromos.php+32
    Undefined variable: wpdb

Server metrics [RAM: ▼1.96MB] [CPU: ▼52.08ms] Passed 4 tests

Analyzing server-side resources used by Easypromos Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.21 ▼33.99
Dashboard /wp-admin2.05 ▼1.266.54 ▼38.60
Posts /wp-admin/edit.php2.05 ▼1.316.11 ▼38.63
Add New Post /wp-admin/post-new.php2.05 ▼3.845.81 ▼97.10
Media Library /wp-admin/upload.php2.05 ▼1.185.55 ▼31.55

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: 1 new table, 6 new options
New tables
wp_easyp_shortcode
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Easypromos Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲7113.24 ▼1.141.93 ▲0.0039.87 ▼3.43
Dashboard /wp-admin2,230 ▲385.81 ▲0.89107.86 ▼3.9840.43 ▲0.65
Posts /wp-admin/edit.php2,110 ▲212.00 ▼0.0235.52 ▼0.6634.08 ▲0.50
Add New Post /wp-admin/post-new.php6,373 ▲4,85427.90 ▲4.71899.70 ▲295.4338.34 ▼20.65
Media Library /wp-admin/upload.php1,406 ▲184.31 ▲0.1393.37 ▼1.0241.26 ▼3.73

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the easypromos-frame-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots lack descriptions #5, #6, #7 in easypromos/assets to your readme.txt
  • Contributors: The plugin contributors field is missing
The official readme.txt might help

easypromos/easypromos.php 85% from 13 tests

The entry point to "Easypromos Plugin" version 1.3.7 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.7" instead of "4.9")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 166 characters long)

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
There were no executable files found in this plugin1,045 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP48229434
CSS2347293
JavaScript34433269
PO File15937
SVG20012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.57MB with 0.41MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png146.99KB37.05KB▼ 74.80%
assets/screenshot-2.png147.94KB42.09KB▼ 71.55%
assets/screenshot-3.png246.80KB67.02KB▼ 72.84%
assets/screenshot-4.png40.70KB11.91KB▼ 70.73%