84% staging-cdn

Code Review | Staging CDN

WordPress plugin Staging CDN scored84%from 54 tests.

About plugin

  • Plugin page: staging-cdn
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 16, 2020
  • Latest release: Mar 17, 2020
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: ronanmockett (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /585 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.82ms] Passed 4 tests

This is a short check of server-side resources used by Staging CDN
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0736.62 ▲0.44
Dashboard /wp-admin3.37 ▲0.0244.90 ▼13.67
Posts /wp-admin/edit.php3.48 ▲0.1348.80 ▼1.72
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.08 ▼24.32
Media Library /wp-admin/upload.php3.29 ▲0.0634.76 ▲1.64
Staging CDN /wp-admin/tools.php?page=stgcdn-admin3.2630.16

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Staging CDN
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3514.42 ▲0.131.87 ▼0.0641.06 ▼2.70
Dashboard /wp-admin2,209 ▲175.83 ▲0.9098.47 ▼8.4738.35 ▼5.05
Posts /wp-admin/edit.php2,095 ▲92.13 ▲0.1440.03 ▼1.3036.09 ▼0.75
Add New Post /wp-admin/post-new.php1,542 ▼018.09 ▼0.12651.30 ▼1.6065.90 ▲5.83
Media Library /wp-admin/upload.php1,397 ▲124.17 ▼0.0395.76 ▼6.8541.12 ▼7.16
Staging CDN /wp-admin/tools.php?page=stgcdn-admin8182.0526.5024.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/staging-cdn/admin/admin_settings.php:2

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)
No browser errors were detected

Optimizations

Plugin configuration 96% 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
5 plugin tags: reference, staging, media, development, cdn

staging-cdn/staging-cdn.php 92% from 13 tests

The principal PHP file in "Staging CDN" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin383 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP35038278
Sass16194
Markdown18010
CSS1011

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity53.00
▷ Minimum class complexity53.00
▷ Maximum class complexity53.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods1266.67%
▷ Protected methods00.00%
▷ Private methods633.33%
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