84% tiny-cdn

Code Review | Tiny CDN

WordPress plugin Tiny CDN scored84%from 54 tests.

About plugin

  • Plugin page: tiny-cdn
  • Plugin version: 0.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Jun 26, 2017
  • Latest release: Oct 6, 2018
  • Number of updates: 5
  • Update frequency: every 93.2 days
  • Top authors: szepe.viktor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,116 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by Tiny CDN
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.13 ▼3.14
Dashboard /wp-admin3.31 ▲0.0044.76 ▼0.13
Posts /wp-admin/edit.php3.36 ▲0.0046.90 ▲2.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.49 ▼3.95
Media Library /wp-admin/upload.php3.23 ▲0.0032.80 ▼0.10

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tiny CDN
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.81 ▲0.431.92 ▲0.2544.78 ▲3.04
Dashboard /wp-admin2,203 ▲155.84 ▼0.0795.97 ▼6.2236.89 ▼4.74
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0042.04 ▲7.7835.02 ▲1.36
Add New Post /wp-admin/post-new.php1,542 ▲2818.32 ▲0.79608.18 ▼65.8849.61 ▼3.51
Media Library /wp-admin/upload.php1,388 ▼04.23 ▼0.0694.38 ▼5.2743.14 ▼1.13

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/tiny-cdn/tiny-cdn.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: cdn, content delivery network, performance, optimization

tiny-cdn/tiny-cdn.php Passed 13 tests

This is the main PHP file of "Tiny CDN" version 0.1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
51 characters long description:
Use an origin pull CDN with very few lines of code.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected82 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1426982

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods9
▷ Static methods00.00%
▷ Public methods777.78%
▷ Protected methods00.00%
▷ Private methods222.22%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
No PNG files were detected