78% it-popups

Code Review | IT Popups

WordPress plugin IT Popups scored78%from 54 tests.

About plugin

  • Plugin page: it-popups
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9
  • WordPress version: 6.3.1
  • First release: Jun 6, 2017
  • Latest release: Dec 23, 2017
  • Number of updates: 26
  • Update frequency: every 7.7 days
  • Top authors: iticiti (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,034 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼0.98ms] Passed 4 tests

A check of server-side resources used by IT Popups
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.49 ▼0.13
Dashboard /wp-admin3.41 ▲0.1053.43 ▼0.17
Posts /wp-admin/edit.php3.52 ▲0.1650.52 ▲0.19
Add New Post /wp-admin/post-new.php6.01 ▲0.11100.52 ▼3.81
Media Library /wp-admin/upload.php3.33 ▲0.1037.07 ▲1.04
IT Popups /wp-admin/options-general.php?page=it_modal_popup3.2735.46

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for IT Popups
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲12113.50 ▼0.798.69 ▲7.0543.71 ▲1.72
Dashboard /wp-admin2,202 ▲255.68 ▲0.0085.78 ▼7.6141.64 ▼0.15
Posts /wp-admin/edit.php2,110 ▲72.02 ▲0.0334.71 ▼4.1634.08 ▼2.36
Add New Post /wp-admin/post-new.php1,535 ▲922.95 ▼0.10703.17 ▼5.5265.27 ▲10.80
Media Library /wp-admin/upload.php1,410 ▲104.23 ▲0.0195.13 ▼12.2941.17 ▼2.97
IT Popups /wp-admin/options-general.php?page=it_modal_popup1,7156.80140.2065.35

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% 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 server-side errors were triggered
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=it_modal_popup
    • > Notice in wp-content/plugins/it-popups/it-popup.php+373
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=it_modal_popup
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/it-popups/it-popup.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: contact, popup, modal

it-popups/it-popup.php 77% from 13 tests

The principal PHP file in "IT Popups" v. 1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Name the main plugin file the same as the plugin slug ("it-popups.php" instead of "it-popup.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,369 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript315548861
PHP27277408
CSS2137100

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions24
▷ Named functions24100.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 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/color/hs.png2.62KB7.54KB0.00%
assets/js/color/hv.png2.80KB7.32KB0.00%