89% toms-pretty-list

Code Review | TomS Pretty List

WordPress plugin TomS Pretty List scored89%from 54 tests.

About plugin

  • Plugin page: toms-pretty-list
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.9.1
  • WordPress version: 6.3.1
  • First release: Dec 5, 2021
  • Latest release: Mar 4, 2022
  • Number of updates: 4
  • Update frequency: every 22.5 days
  • Top authors: tomsneddon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,722 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by TomS Pretty List
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.55 ▼6.71
Dashboard /wp-admin3.33 ▼0.0253.63 ▼12.58
Posts /wp-admin/edit.php3.38 ▲0.0251.50 ▲2.39
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.91 ▼7.51
Media Library /wp-admin/upload.php3.25 ▲0.0241.35 ▲8.14

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

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

Browser metrics Passed 4 tests

A check of browser resources used by TomS Pretty List
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.45 ▲0.101.98 ▲0.1941.14 ▲3.12
Dashboard /wp-admin2,221 ▲185.85 ▲0.04109.45 ▲5.4037.07 ▼9.80
Posts /wp-admin/edit.php2,079 ▼212.02 ▼0.0339.15 ▼6.3131.07 ▼6.03
Add New Post /wp-admin/post-new.php6,364 ▲4,81928.48 ▲5.12969.38 ▲368.9857.76 ▼3.35
Media Library /wp-admin/upload.php1,403 ▲124.30 ▲0.0996.72 ▼5.9547.38 ▼2.71

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were 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:
  • Screenshots: These screenshots do not have images: #1 (add TomS Pretty List block from inserter), #2 (TomS Pretty List block), #3 (TomS Pretty List display effect after published), #4 (TomS Pretty List Settings options), #5 (add TomS Pretty List block to widget)
The official readme.txt is a good inspiration

toms-pretty-list/toms-pretty-list.php 92% from 13 tests

The principal PHP file in "TomS Pretty List" v. 1.0.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.4" instead of "7.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin14,359 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22,6653,47613,789
CSS21113200
JSON200174
PO File14679126
PHP3191870

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/default.png53.87KB18.61KB▼ 65.46%