83% magic-popups-customizable-and-lightweight

Code Review | Magic Popups - Custom and Lightweight Popups

WordPress plugin Magic Popups - Custom and Lightweight Popups scored83%from 54 tests.

About plugin

  • Plugin page: magic-popups-cust...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Apr 20, 2022
  • Latest release: Sep 3, 2022
  • Number of updates: 11
  • Update frequency: every 12.4 days
  • Top authors: mattfletcher94 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,516 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.89ms] Passed 4 tests

A check of server-side resources used by Magic Popups - Custom and Lightweight Popups
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.46 ▲2.10
Dashboard /wp-admin3.33 ▲0.0243.90 ▼5.06
Posts /wp-admin/edit.php3.38 ▲0.0244.68 ▼5.13
Add New Post /wp-admin/post-new.php5.91 ▲0.0278.81 ▼19.58
Media Library /wp-admin/upload.php3.25 ▲0.0232.12 ▼5.79

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Magic Popups - Custom and Lightweight Popups
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲16913.58 ▼0.794.93 ▲3.2539.06 ▼1.09
Dashboard /wp-admin2,238 ▲504.87 ▼0.05108.78 ▲6.9941.92 ▲1.80
Posts /wp-admin/edit.php2,118 ▲292.06 ▲0.0142.51 ▲4.6940.38 ▲4.87
Add New Post /wp-admin/post-new.php1,546 ▲1223.19 ▲0.15595.92 ▼74.6748.68 ▼5.06
Media Library /wp-admin/upload.php1,414 ▲234.21 ▼0.0794.84 ▼3.2642.31 ▼0.87

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/magic-popups-customizable-and-lightweight/admin/magic-popups-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% 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
9 plugin tags: pop up, fast, simple, custom, popups...

magic-popups-customizable-and-lightweight/magic-popups.php 69% from 13 tests

The main PHP file in "Magic Popups - Custom and Lightweight Popups" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("magic-popups-customizable-and-lightweight.php" instead of "magic-popups.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 197 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin12,245 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript23444110,794
CSS21041191,059
PHP10123490392

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2284.62%
▷ Protected methods00.00%
▷ Private methods415.38%
Functions9
▷ Named functions333.33%
▷ Anonymous functions666.67%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin