84% one-click-modal

Code Review | One Click Modal

WordPress plugin One Click Modal scored 84% from 54 tests.

About plugin

  • Plugin page: one-click-modal
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Jul 24, 2022
  • Latest release: Aug 3, 2022
  • Number of updates: 7
  • Update frequency: every 1.7 days
  • Top authors: shabti (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active / 983 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by One Click Modal
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.74 ▼8.34
Dashboard /wp-admin3.31 ▲0.0144.74 ▼4.56
Posts /wp-admin/edit.php3.36 ▲0.0047.36 ▲3.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.54 ▼3.94
Media Library /wp-admin/upload.php3.23 ▲0.0033.87 ▲2.15

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

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

Browser metrics Passed 4 tests

A check of browser resources used by One Click Modal
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.141.64 ▼0.6041.22 ▼0.49
Dashboard /wp-admin2,206 ▲184.84 ▼0.05117.47 ▲2.9241.83 ▼7.55
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0236.43 ▼1.6632.44 ▲1.34
Add New Post /wp-admin/post-new.php1,514 ▼2817.77 ▼0.34606.34 ▼30.7054.41 ▼8.85
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0496.55 ▼10.3542.64 ▼2.41

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/one-click-modal/one-click-modal.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
2 plugin tags: modal popup, elementor

one-click-modal/one-click-modal.php Passed 13 tests

"One Click Modal" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
103 characters long description:
Simple plugin that allows you to show any Elementor widget inside of a modal window. Requires Elementor

Code Analysis Passed 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 plugin553 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP268103494
CSS20039
JavaScript24020

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity11.50
▷ Minimum class complexity4.00
▷ Maximum class complexity19.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods15
▷ Static methods16.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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