79% ultimate-modal

Code Review | Ultimate Modal

WordPress plugin Ultimate Modal scored79%from 54 tests.

About plugin

  • Plugin page: ultimate-modal
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.5
  • WordPress version: 6.3.1
  • First release: Apr 22, 2013
  • Latest release: Aug 11, 2020
  • Number of updates: 19
  • Update frequency: every 140.4 days
  • Top authors: claudiosanches (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

300+ active /21,321 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
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.39ms] Passed 4 tests

An overview of server-side resources used by Ultimate Modal
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0638.84 ▼1.04
Dashboard /wp-admin3.42 ▲0.0853.62 ▼0.98
Posts /wp-admin/edit.php3.54 ▲0.1451.40 ▼5.90
Add New Post /wp-admin/post-new.php6.00 ▲0.0791.82 ▼21.62
Media Library /wp-admin/upload.php3.35 ▲0.0738.64 ▲1.70
Ultimate Modal /wp-admin/options-general.php?page=ultimate-modal3.2932.71

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
ultimatemodal_settings
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Ultimate Modal
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▲0.101.75 ▼0.1142.29 ▼4.09
Dashboard /wp-admin2,199 ▲225.66 ▲0.0287.33 ▼0.5139.37 ▼2.50
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0234.59 ▼4.8231.87 ▼4.64
Add New Post /wp-admin/post-new.php1,538 ▲1218.07 ▼5.42625.92 ▼87.7262.79 ▼11.39
Media Library /wp-admin/upload.php1,401 ▲44.20 ▲0.0796.76 ▼40.4944.00 ▼4.77
Ultimate Modal /wp-admin/options-general.php?page=ultimate-modal1,4264.0063.0843.64

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=ultimate-modal
    • > User deprecated in wp-includes/functions.php+5737
    Function wp_editor() was called with an argument that is deprecated since version 3.9.0! TinyMCE editor IDs cannot have brackets.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× 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/ultimate-modal/ultimate-modal.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function status_header() in wp-content/plugins/ultimate-modal/uninstall.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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

ultimate-modal/ultimate-modal.php Passed 13 tests

The principal PHP file in "Ultimate Modal" v. 1.4.2 is loaded by WordPress automatically on each request
42 characters long description:
Displays a modal content in your WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin375 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP296151307
PO File1235465
JavaScript2002
CSS1001

PHP code Passed 2 tests

Analyzing 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.34
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1583.33%
▷ Protected methods211.11%
▷ Private methods15.56%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/close.png0.61KB0.61KB0.00%