94% forensiq-shortcode

Code Review | Forensiq Shortcode

WordPress plugin Forensiq Shortcode scored 94% from 54 tests.

About plugin

  • Plugin page: forensiq-shortcode
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.1
  • WordPress version: 5.8.1
  • First release: Dec 18, 2014
  • Latest release: Jan 23, 2015
  • Number of updates: 4
  • Update frequency: every 9.0 days
  • Top authors: hypedtext (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 471 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Forensiq Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0028.29 ▲3.07
Dashboard /wp-admin3.06 ▼0.0034.61 ▼7.44
Posts /wp-admin/edit.php3.12 ▲0.0134.96 ▼0.50
Add New Post /wp-admin/post-new.php5.43 ▼0.0173.38 ▼571.47
Media Library /wp-admin/upload.php3.01 ▲0.0024.79 ▲1.95
Forensiq Shortcode /wp-admin/options-general.php?page=forensiq-shortcode/Forensiq_Shortcode.php2.9823.44

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Forensiq Shortcode: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,673 ▲4615.93 ▼0.104.89 ▼1.9175.01 ▼1.40
Dashboard /wp-admin2,935 ▲366.15 ▼0.00114.21 ▼14.24165.79 ▼5.12
Posts /wp-admin/edit.php2,745 ▲53.22 ▼0.0063.04 ▼1.56128.83 ▼15.31
Add New Post /wp-admin/post-new.php3,818 ▲7519.15 ▲0.07419.36 ▼12.23160.43 ▲0.24
Media Library /wp-admin/upload.php1,757 ▲85.49 ▼0.01138.02 ▲0.20194.07 ▲6.96
Forensiq Shortcode /wp-admin/options-general.php?page=forensiq-shortcode/Forensiq_Shortcode.php1,2222.3753.68116.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/forensiq-shortcode/Forensiq_Shortcode.php:15

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Settings...) image not found
The official readme.txt is a good inspiration

forensiq-shortcode/Forensiq_Shortcode.php 92% from 13 tests

The main PHP file in "Forensiq Shortcode" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("forensiq-shortcode.php" instead of "Forensiq_Shortcode.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
Success! There were no dangerous files found in this plugin157 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1811138
JavaScript10019

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ 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%
Functions0
▷ Named functions00.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
1 PNG file occupies 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png73.11KB21.05KB▼ 71.21%