90% ocean-modal-window

Code Review | Ocean Modal Window

WordPress plugin Ocean Modal Window scored 90% from 54 tests.

About plugin

  • Plugin page: ocean-modal-window
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 31, 2017
  • Latest release: Sep 6, 2023
  • Number of updates: 47
  • Update frequency: every 51.2 days
  • Top authors: oceanwp (57.45%)apprimit (44.68%)

Code review

54 tests

User reviews

11 reviews

Install metrics

10,000+ active / 262,498 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.44MB] [CPU: ▼7.50ms] Passed 4 tests

Server-side resources used by Ocean Modal Window
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4340.73 ▼2.39
Dashboard /wp-admin3.73 ▲0.4245.51 ▼5.75
Posts /wp-admin/edit.php3.84 ▲0.4846.01 ▼2.83
Add New Post /wp-admin/post-new.php6.37 ▲0.4885.76 ▼19.01
Media Library /wp-admin/upload.php3.65 ▲0.4237.43 ▲1.90
Modal /wp-admin/edit.php?post_type=ocean_modal_window3.6938.54
Add New /wp-admin/post-new.php?post_type=ocean_modal_window6.3582.31

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 36 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
ocean-modal-window-version
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ocean Modal Window
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲11413.60 ▼0.781.84 ▼0.0340.54 ▼10.66
Dashboard /wp-admin2,233 ▲484.85 ▼0.0397.41 ▼16.3537.72 ▼5.11
Posts /wp-admin/edit.php2,110 ▲211.98 ▼0.0236.18 ▼0.3631.31 ▼2.82
Add New Post /wp-admin/post-new.php1,548 ▲1523.33 ▲0.26677.84 ▼20.4056.48 ▲3.38
Media Library /wp-admin/upload.php1,409 ▲244.16 ▼0.06121.74 ▼12.2545.76 ▼7.36
Modal /wp-admin/edit.php?post_type=ocean_modal_window1,0771.9329.8629.06
Add New /wp-admin/post-new.php?post_type=ocean_modal_window6,39523.45893.7228.79

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • ocean-modal-window-version
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: modal, modal popup, oceanwp

ocean-modal-window/ocean-modal-window.php Passed 13 tests

The entry point to "Ocean Modal Window" version 2.2.0 is a PHP file that has certain tags in its header comment area
99 characters long description:
Create the good kind of popups with ease. Display any content in a modal, anywhere on your website.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin5,653 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP55185153,075
JavaScript14157851,202
PO File3300388738
CSS61723341
Sass2420287
Markdown13010

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 119)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity293.00
▷ Minimum class complexity293.00
▷ Maximum class complexity293.00
Average method complexity10.42
▷ Minimum method complexity1.00
▷ Maximum method complexity119.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods31
▷ Static methods39.68%
▷ Public methods3096.77%
▷ Protected methods00.00%
▷ Private methods13.23%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin