84% disable-unsplash-cdn

Code Review | Disable Unsplash CDN

WordPress plugin Disable Unsplash CDN scored84%from 54 tests.

About plugin

  • Plugin page: disable-unsplash-cdn
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9
  • WordPress version: 6.3.1
  • First release: Aug 3, 2020
  • Latest release: Jun 28, 2022
  • Number of updates: 12
  • Update frequency: every 57.8 days
  • Top authors: everpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,637 total downloads

Benchmarks

Plugin footprint 82% 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.00MB] [CPU: ▼4.78ms] Passed 4 tests

A check of server-side resources used by Disable Unsplash CDN
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.86 ▲1.16
Dashboard /wp-admin3.31 ▲0.0152.43 ▼1.29
Posts /wp-admin/edit.php3.36 ▲0.0050.82 ▲5.66
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.16 ▼18.38
Media Library /wp-admin/upload.php3.24 ▲0.0037.88 ▼0.60

Server storage [IO: ▲0.00MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/disable-unsplash-cdn/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Disable Unsplash CDN
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.28 ▼1.314.82 ▲2.7039.03 ▼3.37
Dashboard /wp-admin2,221 ▲155.83 ▲0.0498.24 ▼9.9040.25 ▲1.92
Posts /wp-admin/edit.php2,103 ▲61.98 ▼0.0535.07 ▼1.7733.64 ▼1.91
Add New Post /wp-admin/post-new.php1,554 ▲2323.20 ▲0.12696.45 ▲78.0961.27 ▲6.20
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.0197.09 ▼6.9047.55 ▲1.89

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

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 no errors were found, this is by no means 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-unsplash-cdn/disable-unsplash-cdn.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: media library, cdn, hotlink, unsplash

disable-unsplash-cdn/disable-unsplash-cdn.php Passed 13 tests

"Disable Unsplash CDN" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
69 characters long description:
Disables images getting served from the Unsplash CDN on the frontend.

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
Good job! No executable or dangerous file extensions detected27 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
Markdown112019
PHP1488

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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