77% nite-shortcodes

Code Review | Nite Shortcodes

WordPress plugin Nite Shortcodes scored77%from 54 tests.

About plugin

  • Plugin page: nite-shortcodes
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 6.3.1
  • First release: Aug 12, 2014
  • Latest release: Sep 6, 2014
  • Number of updates: 19
  • Update frequency: every 1.3 days
  • Top authors: nitethemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,229 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
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.99ms] Passed 4 tests

Analyzing server-side resources used by Nite Shortcodes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1141.99 ▲1.82
Dashboard /wp-admin3.40 ▲0.0647.85 ▼17.51
Posts /wp-admin/edit.php3.51 ▲0.1651.79 ▼1.89
Add New Post /wp-admin/post-new.php5.98 ▲0.1099.69 ▼9.76
Media Library /wp-admin/upload.php3.32 ▲0.1037.96 ▲1.20

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Nite Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲11113.54 ▼1.027.71 ▲6.0740.62 ▼1.52
Dashboard /wp-admin2,192 ▲155.64 ▼0.0191.86 ▼6.9541.58 ▼2.01
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0039.73 ▼0.0435.63 ▼5.36
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▲0.21660.12 ▲20.7762.39 ▲11.86
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.0197.46 ▼16.0442.01 ▼0.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/nite-shortcodes/tinymce/langs.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nite-shortcodes/tinymce/tinymce.php:84
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nite-shortcodes/nite-shortcode.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nite-shortcodes/tinymce/shortcodes.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Donate link: Invalid URI found ("")
You can take inspiration from this readme.txt

nite-shortcodes/nite-shortcode.php 85% from 13 tests

The main file in "Nite Shortcodes" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 186 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("nite-shortcodes.php" instead of "nite-shortcode.php")

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
No dangerous file extensions were detected1,524 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP610753853
CSS24229519
JavaScript31633152

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions49
▷ Named functions49100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
8 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/close.png0.44KB0.38KB▼ 14.79%
images/code.png0.39KB0.50KB0.00%
images/information.png0.51KB0.45KB▼ 11.00%
images/tick.png0.34KB0.28KB▼ 15.99%
images/speak.png0.37KB0.74KB0.00%