89% wp-librejs

Code Review | WP LibreJS

WordPress plugin WP LibreJS scored89%from 54 tests.

About plugin

  • Plugin page: wp-librejs
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.3
  • WordPress version: 6.3.1
  • First release: Sep 29, 2021
  • Latest release: Aug 16, 2023
  • Number of updates: 12
  • Update frequency: every 57.3 days
  • Top authors: minsc78 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /668 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by WP LibreJS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0963.00 ▲20.46
Dashboard /wp-admin3.31 ▲0.0146.66 ▼4.65
Posts /wp-admin/edit.php3.36 ▲0.0047.56 ▼1.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.40 ▼0.85
Media Library /wp-admin/upload.php3.23 ▲0.0034.69 ▼0.84

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP LibreJS
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.27 ▼1.144.95 ▲3.1138.19 ▼12.47
Dashboard /wp-admin2,206 ▲154.87 ▲0.02108.18 ▲1.8542.59 ▼0.71
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0539.74 ▲0.4035.60 ▼0.16
Add New Post /wp-admin/post-new.php1,541 ▲2723.31 ▲5.43603.53 ▲6.1458.55 ▼4.92
Media Library /wp-admin/upload.php1,388 ▼34.28 ▲0.1094.40 ▼7.4940.11 ▼0.15

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

wp-librejs/wp-librejs.php 92% from 13 tests

The main PHP script in "WP LibreJS" version 1.0.0 is automatically included on every request by WordPress
It is important to 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
Everything looks great! No dangerous files found in this plugin192 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP440160170
PO File17922

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity6.00
▷ Minimum class complexity3.00
▷ Maximum class complexity9.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods16
▷ Static methods956.25%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.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
PNG images were not found in this plugin