90% cdnsun

Code Review | CDNsun - WordPress CDN Plugin

WordPress plugin CDNsun - WordPress CDN Plugin scored90%from 54 tests.

About plugin

  • Plugin page: cdnsun
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.3
  • WordPress version: 6.3.1
  • First release: Jul 20, 2018
  • Latest release: Feb 10, 2020
  • Number of updates: 15
  • Update frequency: every 38.1 days
  • Top authors: cdnsun (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,552 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by CDNsun - WordPress CDN Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.99 ▲0.80
Dashboard /wp-admin3.32 ▼0.0345.02 ▼10.24
Posts /wp-admin/edit.php3.37 ▲0.0146.33 ▼1.89
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.71 ▼19.35
Media Library /wp-admin/upload.php3.24 ▲0.0132.69 ▲1.15
CDNsun /wp-admin/options-general.php?page=cdnsun3.2028.67

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
cdnsun
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by CDNsun - WordPress CDN Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.27 ▼0.091.69 ▲0.0942.82 ▲2.42
Dashboard /wp-admin2,202 ▲325.61 ▼0.0589.81 ▼10.5641.02 ▲0.85
Posts /wp-admin/edit.php2,101 ▲12.00 ▲0.0538.59 ▲1.6534.14 ▼1.29
Add New Post /wp-admin/post-new.php1,531 ▲323.38 ▲0.27668.53 ▼7.8750.84 ▼6.21
Media Library /wp-admin/upload.php1,404 ▲14.25 ▲0.0594.25 ▼0.7142.96 ▲1.11
CDNsun /wp-admin/options-general.php?page=cdnsun9152.0322.3731.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Please a description for screenshot #1 in cdnsun/assets to your readme.txt
The official readme.txt might help

cdnsun/cdnsun.php Passed 13 tests

The main PHP file in "CDNsun - WordPress CDN Plugin" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
61 characters long description:
Integrates any Content Delivery Network (CDN) into WordPress.

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
No dangerous file extensions were detected382 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP44035382

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.00
▷ Minimum class complexity3.00
▷ Maximum class complexity10.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods1058.82%
▷ Public methods1376.47%
▷ Protected methods00.00%
▷ Private methods423.53%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
No PNG images were found in this plugin