72% popping-content-light

Code Review | Popping Content Light

WordPress plugin Popping Content Light scored72%from 54 tests.

About plugin

  • Plugin page: popping-content-l...
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 6.3.1
  • First release: Mar 23, 2015
  • Latest release: Apr 2, 2022
  • Number of updates: 23
  • Update frequency: every 111.7 days
  • Top authors: OTWthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /7,863 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.59MB] [CPU: ▲2.84ms] Passed 4 tests

Analyzing server-side resources used by Popping Content Light
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6447.54 ▲5.58
Dashboard /wp-admin3.95 ▲0.6453.98 ▲5.36
Posts /wp-admin/edit.php4.08 ▲0.7353.07 ▲4.30
Add New Post /wp-admin/post-new.php6.24 ▲0.3688.16 ▼3.88
Media Library /wp-admin/upload.php4.02 ▲0.7944.25 ▲10.85
License Manager /wp-admin/admin.php?page=otw-pcl-lm3.93225.00
otwfcr /wp-admin/admin.php?page=otwfcr3.9334.65
Plugin Options /wp-admin/admin.php?page=otw-pcl-options3.9339.62
All Overlays /wp-admin/admin.php?page=otw-pcl3.9339.74
Overlay action /wp-admin/admin.php?page=otw-pcl-action3.9341.84
Add Overlay /wp-admin/admin.php?page=otw-pcl-manage4.0145.22

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 227 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Popping Content Light
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,197 ▲44019.12 ▲4.748.74 ▲6.5641.53 ▼4.82
Dashboard /wp-admin2,488 ▲3008.33 ▲2.48185.52 ▲69.7494.72 ▲47.51
Posts /wp-admin/edit.php2,539 ▲4506.00 ▲3.9699.44 ▲63.0838.48 ▲4.50
Add New Post /wp-admin/post-new.php6,567 ▲5,02528.66 ▲10.33971.48 ▲342.4337.37 ▼20.77
Media Library /wp-admin/upload.php1,833 ▲4427.62 ▲3.41178.72 ▲77.8690.69 ▲44.79
License Manager /wp-admin/admin.php?page=otw-pcl-lm1,3715.61107.9733.45
otwfcr /wp-admin/admin.php?page=otwfcr1,2265.5291.9323.12
Plugin Options /wp-admin/admin.php?page=otw-pcl-options1,3335.51106.5446.22
All Overlays /wp-admin/admin.php?page=otw-pcl1,2865.5392.7434.13
Overlay action /wp-admin/admin.php?page=otw-pcl-action7071.459.1718.10
Add Overlay /wp-admin/admin.php?page=otw-pcl-manage2,1876.79124.9782.97

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=otw-pcl-manage
    • > Deprecated in wp-content/plugins/popping-content-light/include/otw_components/otw_functions/otw_functions.php+272
    Function get_magic_quotes_gpc() is deprecated

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/popping-content-light/include/otw_components/otw_overlay_shortcode/libs/recaptcha-php-1.11/example-mailhide.php
    • > /wp-content/plugins/popping-content-light/include/otw_components/otw_overlay_light/views/full_bar.view.php
    • > /wp-content/plugins/popping-content-light/include/otw_components/otw_overlay_light/views/side_box.view.php
    • > /wp-content/plugins/popping-content-light/include/otw_components/otw_overlay_light/views/lightbox.view.php
    • > /wp-content/plugins/popping-content-light/include/otw_components/otw_factory/views/action_message.php
  • 128× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/popping-content-light/include/otw_components/otw_overlay_light/views/full_bar.view.php on line 11
    • > PHP Notice
      Undefined variable: overlay_vars in wp-content/plugins/popping-content-light/include/otw_components/otw_overlay_light/views/side_box.view.php on line 11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/popping-content-light/include/otw_components/otw_overlay_light/views/lightbox.view.php on line 5
    • > PHP Notice
      Undefined variable: overlay_vars in wp-content/plugins/popping-content-light/include/otw_components/otw_overlay_light/views/lightbox.view.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function otw_get() in wp-content/plugins/popping-content-light/include/otw_pcl_overlays_action.php:15
    • > PHP Notice
      Undefined variable: overlay_vars in wp-content/plugins/popping-content-light/include/otw_components/otw_overlay_light/views/lightbox.view.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Component' not found in wp-content/plugins/popping-content-light/include/otw_components/otw_factory/otw_factory.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Overlay_Shortcodes' not found in wp-content/plugins/popping-content-light/include/otw_components/otw_overlay_shortcode/shortcodes/otw_shortcode_info_box.class.php:2
    • > PHP Notice
      Undefined variable: overlay_vars in wp-content/plugins/popping-content-light/include/otw_components/otw_overlay_light/views/full_bar.view.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/popping-content-light/include/otw_components/otw_overlay_light/views/lightbox.view.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Full Bar Header - closed), #2 (Full Bar Header - opened), #3 (Side Box Right - closed), #4 (Side Box Right - opened), #5 (Lightbox), #6 (Overlay options page), #7 (OTW Grid Manager), #8 (Shortcodes Interface)
You can take inspiration from this readme.txt

popping-content-light/otw_popping_content.php 92% from 13 tests

This is the main PHP file of "Popping Content Light" version 2.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("popping-content-light.php" instead of "otw_popping_content.php")

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin25,806 lines of code in 95 files:
LanguageFilesBlank linesComment linesLines of code
CSS2173724410,236
PHP512,4621,3669,464
JavaScript191,058993,397
SVG4002,709

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 103)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity47.50
▷ Minimum class complexity1.00
▷ Maximum class complexity193.00
Average method complexity4.81
▷ Minimum method complexity1.00
▷ Maximum method complexity103.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods244
▷ Static methods218.61%
▷ Public methods19680.33%
▷ Protected methods2711.07%
▷ Private methods218.61%
Functions65
▷ Named functions65100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
96 PNG files occupy 2.22MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/otw_components/otw_overlay_grid_manager_light/img/gm-advanced-up-arrow.png0.97KB0.13KB▼ 86.82%
include/otw_components/otw_overlay_light/images/stitch.png0.13KB0.13KB0.00%
include/otw_components/otw_overlay_shortcode/images/pattern-2.png0.12KB0.13KB0.00%
include/otw_components/otw_form/img/colorpicker/colorpicker_rgb_g.png1.04KB0.83KB▼ 20.21%
include/otw_components/otw_overlay_shortcode/images/pattern-5.png1.83KB1.89KB0.00%