90% fetchpriority

Code Review | Fetchpriority

WordPress plugin Fetchpriority scored90%from 54 tests.

About plugin

  • Plugin page: fetchpriority
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3
  • WordPress version: 6.3.1
  • First release: May 5, 2023
  • Latest release: Sep 18, 2023
  • Number of updates: 4
  • Update frequency: every 34.5 days
  • Top authors: performanceteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /950 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
This plugin's installer ran successfully

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

A check of server-side resources used by Fetchpriority
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.95 ▲1.68
Dashboard /wp-admin3.32 ▲0.0149.20 ▲1.87
Posts /wp-admin/edit.php3.37 ▲0.0147.95 ▼3.28
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.10 ▼10.22
Media Library /wp-admin/upload.php3.24 ▲0.0135.82 ▼1.34

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Fetchpriority: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.17 ▼0.181.69 ▼0.2643.75 ▲2.70
Dashboard /wp-admin2,201 ▲215.64 ▲0.1294.49 ▲3.1941.07 ▼5.20
Posts /wp-admin/edit.php2,110 ▲101.98 ▼0.0434.71 ▼2.4336.59 ▼3.22
Add New Post /wp-admin/post-new.php1,538 ▲1023.20 ▲0.01670.86 ▼9.6452.33 ▼3.74
Media Library /wp-admin/upload.php1,403 ▲64.20 ▲0.06100.02 ▼0.5643.70 ▲1.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: images, fetchpriority, performance

fetchpriority/load.php 92% from 13 tests

The main file in "Fetchpriority" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("fetchpriority.php" instead of "load.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin75 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3165563
SVG10012

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.32MB with 0.19MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/icon-128x128.png11.52KB1.48KB▼ 87.18%
.wordpress-org/banner-1544x500.png258.22KB153.69KB▼ 40.48%
.wordpress-org/banner-772x250.png54.32KB25.42KB▼ 53.20%
.wordpress-org/icon-256x256.png4.44KB2.12KB▼ 52.32%