84% wp-cartonbox

Code Review | CartonBox - pop-up modal windows

WordPress plugin CartonBox - pop-up modal windows scored84%from 54 tests.

About plugin

  • Plugin page: wp-cartonbox
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Feb 9, 2018
  • Latest release: Jan 12, 2021
  • Number of updates: 6
  • Update frequency: every 178.0 days
  • Top authors: heorhiiev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /659 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.25ms] Passed 4 tests

An overview of server-side resources used by CartonBox - pop-up modal windows
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.83 ▼1.32
Dashboard /wp-admin3.31 ▲0.0049.60 ▼1.68
Posts /wp-admin/edit.php3.36 ▲0.0050.03 ▼0.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.32 ▼5.01
Media Library /wp-admin/upload.php3.23 ▲0.0038.42 ▲2.42

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for CartonBox - pop-up modal windows
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16214.04 ▼0.257.30 ▲5.5141.45 ▼5.47
Dashboard /wp-admin2,209 ▲214.84 ▼1.05111.49 ▼1.8040.05 ▼5.11
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0140.90 ▲1.9736.94 ▲1.88
Add New Post /wp-admin/post-new.php1,514 ▼1917.76 ▼5.43652.28 ▼19.3764.32 ▲9.33
Media Library /wp-admin/upload.php1,391 ▲124.19 ▼0.0093.81 ▼9.4441.55 ▼2.68

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-cartonbox/wp-cartonbox.php:16
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-cartonbox/wp-cartonbox.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: cartonbox, photo, image, lightbox, fancybox...

wp-cartonbox/wp-cartonbox.php 85% from 13 tests

"CartonBox - pop-up modal windows" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path folder does not exist ("/assets/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected647 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript29294403
CSS2223236
PHP17178

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin