79% simple-site-popup

Code Review | Simple Site Popup

WordPress plugin Simple Site Popup scored79%from 54 tests.

About plugin

  • Plugin page: simple-site-popup
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.0.1
  • WordPress version: 6.3.1
  • First release: Feb 26, 2014
  • Latest release: Dec 4, 2014
  • Number of updates: 7
  • Update frequency: every 40.3 days
  • Top authors: thienhaxanh2405 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,114 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.22ms] Passed 4 tests

Analyzing server-side resources used by Simple Site Popup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.71 ▼3.17
Dashboard /wp-admin3.35 ▲0.0043.50 ▼17.69
Posts /wp-admin/edit.php3.40 ▲0.0448.91 ▲3.11
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.38 ▼6.76
Media Library /wp-admin/upload.php3.27 ▲0.0431.67 ▼1.27
Simple Popup /wp-admin/plugins.php?page=simple-popup-options3.2227.13

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Site Popup
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▼0.181.71 ▼0.0746.40 ▲1.33
Dashboard /wp-admin2,199 ▲195.62 ▼0.0598.44 ▼3.0337.87 ▼4.44
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0039.88 ▲2.4236.10 ▲1.30
Add New Post /wp-admin/post-new.php1,530 ▲223.48 ▲0.20667.65 ▲8.2359.26 ▲0.99
Media Library /wp-admin/upload.php1,404 ▲134.17 ▼0.02108.44 ▲5.1947.18 ▲2.62
Simple Popup /wp-admin/plugins.php?page=simple-popup-options9601.6923.1728.04

Uninstaller [IO: ▲0.00MB] [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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=simple-popup-options
    • > Notice in wp-content/plugins/simple-site-popup/admin.php+45
    Undefined variable: Enable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=simple-popup-options
    • > Notice in wp-content/plugins/simple-site-popup/admin.php+51
    Undefined variable: DisplayInHomepage

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
Please fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/simple-site-popup/simple-site-popup.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-site-popup/admin.php:3
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/simple-site-popup/simple-site-popup.php on line 12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-site-popup/simple-site-popup.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-site-popup/admin.php:3

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: popup, webiste popup

simple-site-popup/simple-site-popup.php Passed 13 tests

"Simple Site Popup" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
123 characters long description:
A simple way to add popup to your site. Demo and support, please follow: http://thienhaxanh.info/plug-in-simple-site-popup/

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected286 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24734242
CSS11326
JavaScript15318

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.51
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.28MB with 0.15MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Screenshot-1.png180.35KB72.57KB▼ 59.76%
Screenshot-2.png98.24KB35.00KB▼ 64.38%
images/close-icon.png3.08KB1.84KB▼ 40.07%