84% cdn-modal-enabler

Code Review | CDN Modal Enabler

WordPress plugin CDN Modal Enabler scored84%from 54 tests.

About plugin

  • Plugin page: cdn-modal-enabler
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: Jun 27, 2019
  • Latest release: Jun 27, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: giacomolaw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /597 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Server-side resources used by CDN Modal Enabler
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.01 ▲1.13
Dashboard /wp-admin3.31 ▲0.0050.05 ▲1.11
Posts /wp-admin/edit.php3.36 ▲0.0048.43 ▼3.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.04 ▼12.61
Media Library /wp-admin/upload.php3.23 ▲0.0038.28 ▲2.17

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for CDN Modal Enabler
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.17 ▼0.231.88 ▲0.3139.41 ▼1.02
Dashboard /wp-admin2,198 ▲215.61 ▲0.0291.52 ▲3.3541.58 ▼3.84
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0139.30 ▲3.4036.84 ▲3.28
Add New Post /wp-admin/post-new.php1,531 ▲323.10 ▼0.15676.69 ▲22.7852.45 ▲3.28
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.01102.88 ▲1.5246.57 ▲2.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cdn-modal-enabler/cdn-modal-enabler.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cdn-modal-enabler/1.1.1/cdn-modal-enabler.php:36

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: images, cdn

cdn-modal-enabler/cdn-modal-enabler.php Passed 13 tests

The primary PHP file in "CDN Modal Enabler" version 1.1.1 is used by WordPress to initiate all plugin functionality
76 characters long description:
Enable the modal image when using a CDN in the Newspaper and Newsmag themes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin23 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111223

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions4
▷ Named functions4100.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
There were not PNG files found in your plugin