84% image-modal

Code Review | Image Modal

WordPress plugin Image Modal scored84%from 54 tests.

About plugin

  • Plugin page: image-modal
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 3, 2023
  • Latest release: Mar 3, 2023
  • Number of updates: 3
  • Update frequency: every 10.3 days
  • Top authors: gptmade (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /217 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.32MB] [CPU: ▼22.45ms] Passed 4 tests

A check of server-side resources used by Image Modal
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0145.16 ▲3.45
Dashboard /wp-admin3.32 ▼0.0349.32 ▼12.47
Posts /wp-admin/edit.php3.37 ▲0.0151.06 ▼3.10
Add New Post /wp-admin/post-new.php4.61 ▼1.2843.17 ▼67.59
Media Library /wp-admin/upload.php3.24 ▲0.0133.67 ▼6.65

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Image Modal
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.16 ▼0.201.84 ▲0.0745.43 ▼1.06
Dashboard /wp-admin2,198 ▲245.61 ▲0.0792.99 ▲0.6841.44 ▼3.06
Posts /wp-admin/edit.php2,103 ▼02.03 ▲0.0339.75 ▼3.0735.81 ▼2.30
Add New Post /wp-admin/post-new.php1,528 ▼923.41 ▲4.94632.26 ▲5.0249.35 ▼10.48
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.01102.47 ▼2.3346.39 ▼2.36

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/image-modal/image-modal.php:60

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Requires at least: Invalid plugin version format
The official readme.txt is a good inspiration

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

The principal PHP file in "Image Modal" v. 1.0 is loaded by WordPress automatically on each request
91 characters long description:
Allows users to click on any image within post or page content and enlarge them in a modal.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin118 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS15056
PHP1122140
JavaScript11222

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected