84% protocol-relative-theme-assets

Code Review | Protocol Relative Theme Assets

WordPress plugin Protocol Relative Theme Assets scored84%from 54 tests.

About plugin

  • Plugin page: protocol-relative...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.0
  • WordPress version: 6.3.1
  • First release: May 21, 2014
  • Latest release: May 22, 2014
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: ryanjbonnell (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /2,233 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Protocol Relative Theme Assets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.12 ▼2.49
Dashboard /wp-admin3.32 ▼0.0242.22 ▼17.56
Posts /wp-admin/edit.php3.37 ▲0.0144.09 ▼4.78
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.82 ▼1.42
Media Library /wp-admin/upload.php3.24 ▲0.0131.98 ▼1.33

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Protocol Relative Theme Assets
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.251.71 ▼0.1244.94 ▲0.17
Dashboard /wp-admin2,206 ▲214.85 ▼0.05107.33 ▲2.5040.33 ▲0.34
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0139.74 ▼0.1436.18 ▲0.38
Add New Post /wp-admin/post-new.php1,513 ▼1917.47 ▼5.30630.76 ▼19.2950.49 ▼7.53
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0196.09 ▼8.4841.19 ▼2.44

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

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: 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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/protocol-relative-theme-assets/protocol-relative-theme-assets.php:20

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

protocol-relative-theme-assets/protocol-relative-theme-assets.php Passed 13 tests

The primary PHP file in "Protocol Relative Theme Assets" version 1.0 is used by WordPress to initiate all plugin functionality
81 characters long description:
Transforms enqueued CSS and JavaScript theme URLs to use protocol-relative paths.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin26 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1105126

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin