83% medianova-cdn

Code Review | Medianova CDN

WordPress plugin Medianova CDN scored83%from 54 tests.

About plugin

  • Plugin page: medianova-cdn
  • Plugin version: 2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 19, 2019
  • Latest release: Jan 9, 2023
  • Number of updates: 20
  • Update frequency: every 69.8 days
  • Top authors: medianovacdn (70%)tanerozdas (35%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,003 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.58ms] Passed 4 tests

An overview of server-side resources used by Medianova CDN
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.13 ▼3.75
Dashboard /wp-admin3.32 ▲0.0251.32 ▼4.24
Posts /wp-admin/edit.php3.37 ▲0.0147.30 ▼4.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.48 ▼14.01
Media Library /wp-admin/upload.php3.24 ▲0.0138.72 ▲4.43
CDN Medianova /wp-admin/options-general.php?page=cdn_medianova3.2132.89

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
Cdn_Medianova
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Medianova CDN
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3514.44 ▼0.151.78 ▼0.7945.61 ▼10.45
Dashboard /wp-admin2,212 ▲214.86 ▼0.02108.18 ▼13.2442.01 ▼7.15
Posts /wp-admin/edit.php2,095 ▲62.07 ▲0.0639.73 ▲0.5535.70 ▲0.64
Add New Post /wp-admin/post-new.php1,400 ▼11917.94 ▼5.33611.32 ▼23.0647.67 ▼4.06
Media Library /wp-admin/upload.php1,397 ▲64.29 ▲0.1098.35 ▼1.0743.32 ▼1.78
CDN Medianova /wp-admin/options-general.php?page=cdn_medianova9652.1425.6241.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/medianova-cdn/index.php

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
There were no plugin tags found

medianova-cdn/index.php 85% from 13 tests

The main PHP file in "Medianova CDN" ver. 2.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("medianova-cdn.php" instead of "index.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,175 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS115324714
PHP4132208461

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity9.67
▷ Minimum class complexity4.00
▷ Maximum class complexity19.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods36
▷ Static methods1438.89%
▷ Public methods2775.00%
▷ Protected methods925.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.52MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png3.89KB1.94KB▼ 50.10%
assets/banner-1544x500.png31.19KB14.19KB▼ 54.51%
assets/screenshot-1.png473.39KB130.83KB▼ 72.36%
assets/banner-772x250.png14.06KB6.83KB▼ 51.42%
assets/img/bttn_arrow.png0.18KB0.27KB0.00%