84% initial-letter

Code Review | Initial Letter

WordPress plugin Initial Letter scored84%from 54 tests.

About plugin

  • Plugin page: initial-letter
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.6
  • WordPress version: 6.3.1
  • First release: Dec 21, 2012
  • Latest release: Jan 3, 2021
  • Number of updates: 19
  • Update frequency: every 154.8 days
  • Top authors: grimmdude (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

200+ active /11,896 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.16ms] Passed 4 tests

An overview of server-side resources used by Initial Letter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0538.84 ▼6.01
Dashboard /wp-admin3.38 ▲0.0355.67 ▼7.43
Posts /wp-admin/edit.php3.49 ▲0.1358.39 ▲11.03
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.86 ▼7.79
Media Library /wp-admin/upload.php3.30 ▲0.0737.17 ▲0.61
Initial Letter /wp-admin/options-general.php?page=initial-letter3.2731.82

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
initial_letter_plugin
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Initial Letter: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲5713.51 ▼0.721.86 ▼0.3041.00 ▼2.21
Dashboard /wp-admin2,241 ▲385.02 ▲0.11108.78 ▲0.7237.98 ▼2.01
Posts /wp-admin/edit.php2,128 ▲282.31 ▲0.3243.68 ▲3.0735.26 ▼1.52
Add New Post /wp-admin/post-new.php6,260 ▲4,72926.16 ▲3.27933.89 ▲258.9243.66 ▼25.75
Media Library /wp-admin/upload.php1,420 ▲264.46 ▲0.19109.61 ▼1.0646.93 ▲1.04
Initial Letter /wp-admin/options-general.php?page=initial-letter2,9202.3841.3332.82

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • initial_letter_plugin
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/initial-letter/initial-letter.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Screenshot of a options page.)
The official readme.txt might help

initial-letter/initial-letter.php 92% from 13 tests

"Initial Letter" version 2.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin263 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16731260
JavaScript1003

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.37
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.41MB with 0.28MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png212.36KB57.28KB▼ 73.03%
screenshot-1.png206.30KB77.73KB▼ 62.32%