84% woo-popup

Code Review | woo-popup

WordPress plugin woo-popup scored84%from 54 tests.

About plugin

  • Plugin page: woo-popup
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.2
  • WordPress version: 6.3.1
  • First release: Mar 31, 2014
  • Latest release: Oct 30, 2015
  • Number of updates: 22
  • Update frequency: every 26.3 days
  • Top authors: guillaume-lostweb (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

70+ active /12,056 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼10.99ms] Passed 4 tests

Analyzing server-side resources used by woo-popup
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0426.56 ▼17.33
Dashboard /wp-admin3.38 ▲0.0849.82 ▼7.26
Posts /wp-admin/edit.php3.50 ▲0.1455.04 ▼3.71
Add New Post /wp-admin/post-new.php5.96 ▲0.0889.60 ▼15.66
Media Library /wp-admin/upload.php3.31 ▲0.0845.08 ▲5.69

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 87 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
woo-popup_options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for woo-popup
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.11 ▼0.091.68 ▼0.1839.90 ▼3.14
Dashboard /wp-admin2,214 ▲345.65 ▲0.1092.91 ▲5.2138.78 ▼0.68
Posts /wp-admin/edit.php2,116 ▲132.00 ▲0.0440.24 ▼0.5135.29 ▼0.00
Add New Post /wp-admin/post-new.php1,539 ▲1123.05 ▼0.08691.55 ▼11.4465.46 ▼1.46
Media Library /wp-admin/upload.php1,410 ▲104.20 ▼0.0897.90 ▼9.3642.72 ▼4.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-popup/public/views/public.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/woo-popup/admin/views/admin.php:19

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (No screenshots yet)
Please take inspiration from this readme.txt

woo-popup/woo-popup.php 92% from 13 tests

This is the main PHP file of "woo-popup" version 1.3.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected937 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP7140390470
CSS392178
SVG200112
PO File2141489
JavaScript3141288

PHP code Passed 2 tests

This is a short overview 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.30
Average class complexity18.00
▷ Minimum class complexity11.00
▷ Maximum class complexity25.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods726.92%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
34 PNG files occupy 0.34MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/images/chosen-sprite@2x.png0.85KB0.83KB▼ 2.99%
public/assets/images/prettyPhoto/light_rounded/btnNext.png1.38KB1.14KB▼ 17.29%
public/assets/images/prettyPhoto/dark_rounded/contentPattern.png0.13KB0.09KB▼ 25.38%
public/assets/images/prettyPhoto/default/default_thumb.png1.50KB0.61KB▼ 59.47%
public/assets/images/prettyPhoto/facebook/sprite.png4.13KB2.26KB▼ 45.33%