89% fami-sales-popup

Code Review | Fami Sales Popup

WordPress plugin Fami Sales Popup scored89%from 54 tests.

About plugin

  • Plugin page: fami-sales-popup
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2019
  • Latest release: Jun 13, 2019
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: zankover (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /30,733 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Fami Sales Popup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.40 ▼1.13
Dashboard /wp-admin3.32 ▲0.0245.18 ▲1.67
Posts /wp-admin/edit.php3.37 ▲0.0246.43 ▼5.06
Add New Post /wp-admin/post-new.php5.92 ▲0.0482.90 ▼13.25
Media Library /wp-admin/upload.php3.24 ▲0.0232.18 ▲0.45

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Fami Sales Popup: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲19013.64 ▼0.604.94 ▲3.0438.53 ▼5.73
Dashboard /wp-admin2,242 ▲514.97 ▲0.11102.65 ▼11.1782.33 ▲36.81
Posts /wp-admin/edit.php2,125 ▲362.05 ▲0.0336.66 ▼6.2637.46 ▲0.19
Add New Post /wp-admin/post-new.php1,546 ▲123.05 ▲4.92750.14 ▲145.9050.71 ▼2.80
Media Library /wp-admin/upload.php1,424 ▲334.18 ▼0.0295.79 ▼3.6272.57 ▲28.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (General settings), #2 (Compare table settings), #3 (Enable/Disable scripts)
The official readme.txt is a good inspiration

fami-sales-popup/fami-sales-popup.php 85% from 13 tests

"Fami Sales Popup" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 362 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin3,436 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS360561,554
PHP7116941,001
Sass2190449
JavaScript27422432

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity7.50
▷ Minimum class complexity5.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
7 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
assets/css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
assets/css/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%