67% shoutcodes-lite

Code Review | ShoutCodes Lite

WordPress plugin ShoutCodes Lite scored67%from 54 tests.

About plugin

  • Plugin page: shoutcodes-lite
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7
  • WordPress version: 6.3.1
  • First release: Jan 11, 2017
  • Latest release: Feb 27, 2017
  • Number of updates: 4
  • Update frequency: every 11.8 days
  • Top authors: denharsh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /994 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▲1.82ms] Passed 4 tests

A check of server-side resources used by ShoutCodes Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.63 ▲1.33
Dashboard /wp-admin3.37 ▲0.0750.59 ▲4.90
Posts /wp-admin/edit.php3.48 ▲0.1352.84 ▲7.08
Add New Post /wp-admin/post-new.php5.94 ▲0.0687.93 ▼6.05
Media Library /wp-admin/upload.php3.27 ▲0.0445.39 ▲10.87
Settings /wp-admin/admin.php?page=shoutcodes-settings3.2637.45
ShoutCodes /wp-admin/admin.php?page=shoutcodes3.4237.78

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: 1 new table, 9 new options
New tables
wp_shoutcodes
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
shoutcodes_main
shoutcodes_db_version
theysaidso_admin_options
widget_recent-posts
shoutcodes_import
db_upgraded

Browser metrics Passed 4 tests

ShoutCodes Lite: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,068 ▲33315.49 ▲1.095.90 ▲4.3239.50 ▼0.74
Dashboard /wp-admin2,390 ▲2106.60 ▲0.66135.09 ▲28.4738.76 ▼0.59
Posts /wp-admin/edit.php2,293 ▲2073.54 ▲1.5559.19 ▲24.0034.52 ▼0.97
Add New Post /wp-admin/post-new.php1,707 ▲17422.63 ▼0.50626.67 ▼16.5430.31 ▼24.94
Media Library /wp-admin/upload.php1,432 ▲444.35 ▼0.0283.84 ▼13.9343.30 ▼3.68
Settings /wp-admin/admin.php?page=shoutcodes-settings1,1903.5951.9530.72
ShoutCodes /wp-admin/admin.php?page=shoutcodes1,0763.3946.8832.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_shoutcodes
  • Zombie WordPress options detected upon uninstall: 9 options
    • shoutcodes_main
    • widget_recent-posts
    • shoutcodes_import
    • shoutcodes_db_version
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% 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 0% from 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/shoutcodes-lite/index.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/shoutcodes-lite/classes/shoutcodes-manage.php:169
    • > PHP Warning
      Use of undefined constant shoutcodes_URL - assumed 'shoutcodes_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/shoutcodes-lite/classes/shoutcodes-manage.php on line 128
    • > PHP Warning
      Use of undefined constant shoutcodes_URL - assumed 'shoutcodes_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/shoutcodes-lite/classes/shoutcodes-manage.php on line 152
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/shoutcodes-lite/classes/shoutcodes-manage.php on line 167
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/shoutcodes-lite/shoutcodes.php:23
    • > PHP Warning
      Use of undefined constant shoutcodes_URL - assumed 'shoutcodes_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/shoutcodes-lite/classes/shoutcodes-manage.php on line 152
    • > PHP Warning
      Use of undefined constant shoutcodes_URL - assumed 'shoutcodes_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/shoutcodes-lite/classes/shoutcodes-manage.php on line 152

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Configure the URL Trigger), #2 (Adding new links)
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt is a good inspiration

shoutcodes-lite/shoutcodes.php 77% from 13 tests

This is the main PHP file of "ShoutCodes Lite" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("shoutcodes-lite.php" instead of "shoutcodes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,074 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7203336850
CSS140199
JavaScript19425

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity30.25
▷ Minimum class complexity3.00
▷ Maximum class complexity53.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods49
▷ Static methods00.00%
▷ Public methods49100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin