90% xkcd-embed

Code Review | XKCD Embed

WordPress plugin XKCD Embed scored 90% from 54 tests.

About plugin

  • Plugin page: xkcd-embed
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Jan 5, 2015
  • Latest release: Jan 5, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: section214 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 872 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.01MB] [CPU: ▼3.58ms] Passed 4 tests

Server-side resources used by XKCD Embed
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.58 ▼3.47
Dashboard /wp-admin3.32 ▲0.0144.32 ▼3.62
Posts /wp-admin/edit.php3.43 ▲0.0849.44 ▼0.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.73 ▼7.18
Media Library /wp-admin/upload.php3.24 ▲0.0134.26 ▲0.75

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
xkcd_embed
can_compress_scripts
widget_recent-posts
widget_xkcd_embed_widget
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for XKCD Embed
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9214.48 ▼0.161.73 ▼0.0238.91 ▼2.80
Dashboard /wp-admin2,209 ▲214.84 ▼0.06109.46 ▲7.1939.02 ▼3.89
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0541.04 ▼1.2138.30 ▲0.01
Add New Post /wp-admin/post-new.php1,534 ▼923.35 ▲5.23664.89 ▲61.5646.13 ▼7.10
Media Library /wp-admin/upload.php1,391 ▼04.21 ▲0.0299.35 ▲4.8544.51 ▼4.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • xkcd_embed
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_xkcd_embed_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output 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 errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: shortcode, widget, xkcd, webcomic, comic

xkcd-embed/xkcd-embed.php Passed 13 tests

"XKCD Embed" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
36 characters long description:
Display XKCD comics on your website!

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
Success! There were no dangerous files found in this plugin243 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5101223235
CSS1248

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.67
▷ Minimum class complexity5.00
▷ Maximum class complexity15.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods1178.57%
▷ Protected methods00.00%
▷ Private methods321.43%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin