78% sitelint

Code Review | SiteLint

WordPress plugin SiteLint scored78%from 54 tests.

About plugin

  • Plugin page: sitelint
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 16, 2022
  • Latest release: Nov 29, 2023
  • Number of updates: 9
  • Update frequency: every 59.7 days
  • Top authors: ctomczyk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /524 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
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼9.74ms] Passed 4 tests

Server-side resources used by SiteLint
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1123.81 ▼19.04
Dashboard /wp-admin3.43 ▲0.0846.74 ▼14.93
Posts /wp-admin/edit.php3.54 ▲0.1949.34 ▲3.73
Add New Post /wp-admin/post-new.php6.03 ▲0.1490.42 ▼2.37
Media Library /wp-admin/upload.php3.35 ▲0.1234.12 ▼2.63

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

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

Browser metrics Passed 4 tests

A check of browser resources used by SiteLint
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲7114.33 ▲0.071.79 ▼0.2240.33 ▼3.38
Dashboard /wp-admin2,207 ▲265.63 ▲0.0397.06 ▼11.2343.62 ▲0.13
Posts /wp-admin/edit.php2,116 ▲162.05 ▲0.1039.67 ▼1.1335.44 ▲0.24
Add New Post /wp-admin/post-new.php1,540 ▲1123.49 ▼0.26662.44 ▲17.5856.44 ▼0.91
Media Library /wp-admin/upload.php1,412 ▲124.21 ▲0.0396.87 ▼0.3542.53 ▼2.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 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 0% 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sitelint/public/partials/plugin-name-public-display.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/sitelint/admin/partials/sitelint-login.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/sitelint/admin/partials/sitelint-footer.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/sitelint/admin/partials/sitelint-admin-display.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/sitelint/admin/partials/sitelint-signup.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/sitelint/admin/partials/sitelint-results.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/sitelint/admin/partials/sitelint-setup.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/sitelint/admin/partials/sitelint-public.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === sitelint === )
Please take inspiration from this readme.txt

sitelint/sitelint.php 92% from 13 tests

The principal PHP file in "SiteLint" v. 1.4.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected16,513 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
CSS32,2164211,304
JavaScript58932,1923,845
PHP202855051,183
SVG200177
JSON1004

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.36
Average class complexity8.38
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods47
▷ Static methods36.38%
▷ Public methods3165.96%
▷ Protected methods00.00%
▷ Private methods1634.04%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.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
3 PNG files occupy 0.14MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/avatar-grey.png1.05KB1.12KB0.00%
admin/assets/images/sitelint-screenshot-rule-results.png61.78KB34.78KB▼ 43.70%
admin/assets/images/sitelint-screenshot-results.png75.87KB40.94KB▼ 46.05%