84% xl-popup

Code Review | XL PopUp

WordPress plugin XL PopUp scored84%from 54 tests.

About plugin

  • Plugin page: xl-popup
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.9.4
  • WordPress version: 6.3.1
  • First release: Dec 3, 2015
  • Latest release: Mar 10, 2018
  • Number of updates: 5
  • Update frequency: every 165.6 days
  • Top authors: xltheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /690 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.60ms] Passed 4 tests

Analyzing server-side resources used by XL PopUp
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.41 ▼1.06
Dashboard /wp-admin3.41 ▲0.1147.99 ▲1.40
Posts /wp-admin/edit.php3.52 ▲0.1756.05 ▲12.37
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.08 ▼17.00
Media Library /wp-admin/upload.php3.31 ▲0.0836.28 ▲2.27
XL PopUp /wp-admin/options-general.php?page=xl_popup3.3135.82

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
xl_basics
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by XL PopUp
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,058 ▲31215.68 ▲1.096.95 ▲5.2238.82 ▼1.63
Dashboard /wp-admin2,367 ▲1856.63 ▲1.75138.08 ▲36.7440.04 ▼4.29
Posts /wp-admin/edit.php2,267 ▲1813.53 ▲1.5254.90 ▲17.8335.57 ▲2.74
Add New Post /wp-admin/post-new.php1,688 ▲16822.54 ▼0.66630.68 ▼40.7834.72 ▼20.41
Media Library /wp-admin/upload.php1,406 ▲184.33 ▲0.0588.51 ▼9.8147.38 ▲2.33
XL PopUp /wp-admin/options-general.php?page=xl_popup1,0173.3155.3926.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • xl_basics
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xl-popup/lib/xl-scripts.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xl-popup/lib/xl-scripts.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_shortcode() in wp-content/plugins/xl-popup/public/view.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: easy popup plugin, wordpress popup plugin, wordpress popup, xl popup, popup plugin...

xl-popup/xl-functions.php 85% from 13 tests

"XL PopUp" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("xl-popup.php" instead of "xl-functions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected586 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5133198414
JavaScript22912122
CSS11350

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity26.00
▷ Minimum class complexity3.00
▷ Maximum class complexity49.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/yes.png20.36KB7.80KB▼ 61.68%
assets/images/no.png12.45KB6.52KB▼ 47.62%