83% drop-cap-shortcode

Code Review | Drop Cap Shortcode

WordPress plugin Drop Cap Shortcode scored83%from 54 tests.

About plugin

  • Plugin page: drop-cap-shortcode
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.0.1
  • WordPress version: 6.3.1
  • First release: Feb 17, 2011
  • Latest release: Dec 3, 2014
  • Number of updates: 17
  • Update frequency: every 81.5 days
  • Top authors: ekakurniawan (82.35%)bestweblayout (23.53%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /16,273 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
Install script ran successfully

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

Analyzing server-side resources used by Drop Cap Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.26 ▼1.26
Dashboard /wp-admin3.31 ▲0.0151.27 ▼3.21
Posts /wp-admin/edit.php3.36 ▲0.0052.92 ▲2.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0099.09 ▼2.87
Media Library /wp-admin/upload.php3.23 ▲0.0037.33 ▲1.57

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Drop Cap Shortcode: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.79 ▲0.211.80 ▲0.0742.97 ▼0.17
Dashboard /wp-admin2,198 ▲185.67 ▼0.0093.53 ▲0.8544.75 ▲0.31
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0038.76 ▲2.5835.42 ▲1.05
Add New Post /wp-admin/post-new.php1,546 ▼022.88 ▼0.29647.31 ▼50.8558.15 ▼1.66
Media Library /wp-admin/upload.php1,400 ▼34.17 ▼0.06101.99 ▼2.1645.34 ▲0.41

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
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/drop-cap-shortcode/dropcaps-shortcode.php:214

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (How you change your first letter into a shortcode in your writing panel.), #2 (How your shortcode will show as a drop cap in your published post.)
You can look at the official readme.txt

drop-cap-shortcode/dropcaps-shortcode.php 85% from 13 tests

"Drop Cap Shortcode" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("drop-cap-shortcode.php" instead of "dropcaps-shortcode.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 200 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected210 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12917197
CSS11313

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.43MB with 0.28MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png210.13KB75.14KB▼ 64.24%
screenshot-2.png234.56KB82.54KB▼ 64.81%