84% moecdn

Code Review | MoeNet Public CDN

WordPress plugin MoeNet Public CDN scored84%from 54 tests.

About plugin

  • Plugin page: moecdn
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 6.3.1
  • First release: Dec 23, 2015
  • Latest release: Jul 4, 2016
  • Number of updates: 17
  • Update frequency: every 11.4 days
  • Top authors: a913844287 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,904 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
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.30ms] Passed 4 tests

Analyzing server-side resources used by MoeNet Public CDN
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.87 ▲4.91
Dashboard /wp-admin3.41 ▲0.1043.02 ▼7.88
Posts /wp-admin/edit.php3.44 ▲0.0946.41 ▼1.11
Add New Post /wp-admin/post-new.php6.08 ▲0.2085.16 ▼0.03
Media Library /wp-admin/upload.php3.34 ▲0.1231.82 ▼0.19
MoeCDN /wp-admin/options-general.php?page=moecdn3.2630.32

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
moecdn_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by MoeNet Public CDN
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.60 ▼0.781.82 ▼0.0737.80 ▼6.54
Dashboard /wp-admin2,213 ▲255.89 ▲0.97106.32 ▲1.0240.43 ▼2.50
Posts /wp-admin/edit.php2,096 ▲72.04 ▼0.0139.48 ▼4.9336.63 ▼1.36
Add New Post /wp-admin/post-new.php1,545 ▲918.07 ▼5.29608.32 ▼5.0456.46 ▲1.79
Media Library /wp-admin/upload.php1,392 ▲104.17 ▼0.1093.63 ▼6.2242.30 ▼3.49
MoeCDN /wp-admin/options-general.php?page=moecdn8432.0425.2370.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • moecdn_options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/moecdn/moecdn.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === moecdn === )
  • Screenshots: Screenshot #1 (The setting page.) image missing
You can take inspiration from this readme.txt

moecdn/moecdn.php Passed 13 tests

"MoeNet Public CDN" version 1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
102 characters long description:
加速Gravatar/GoogleAPIs/WordPress.com等由于众所周知的原因而在中国无法访问的资源

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 plugin156 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12116156

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods14100.00%
▷ Public methods1178.57%
▷ Protected methods321.43%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin