10% simple-quotation

Code Review | Simple Quotation

WordPress plugin Simple Quotation scored 10% from 54 tests.

About plugin

  • Plugin page: simple-quotation
  • Plugin version: %s by %s', 'SL_framework'),$info['Version'],$info['Author']) ; ?> ()
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 5.8.1
  • First release: Jul 9, 2011
  • Latest release: Apr 19, 2016
  • Number of updates: 44
  • Update frequency: every 39.7 days
  • Top authors: sedLex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 3,700 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/simple-quotation/core.class.php+1698
    Methods with the same name as their class will not be constructors in a future version of PHP; coreSLframework has a deprecated constructor

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

This is a short check of server-side resources used by Simple Quotation
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1234.02 ▲13.17
Dashboard /wp-admin3.06 ▲0.0053.94 ▲7.64
Posts /wp-admin/edit.php3.11 ▲0.0044.03 ▲2.59
Add New Post /wp-admin/post-new.php5.42 ▼0.0288.99 ▼576.44
Media Library /wp-admin/upload.php3.00 ▲0.0031.31 ▼6.61

Server storage [IO: ▲2.56MB] [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: 167 new files
Database: 1 new table, no new options
New tables
wp_pluginSL_quotation

Browser metrics Passed 4 tests

Checking browser requirements for Simple Quotation
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.82 ▲0.098.99 ▼0.8747.96 ▲4.78
Dashboard /wp-admin2,973 ▲365.95 ▲0.04142.16 ▼14.81105.14 ▼5.86
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0171.89 ▲8.1579.24 ▼8.93
Add New Post /wp-admin/post-new.php1,676 ▲9518.88 ▼1.67393.14 ▼12.58104.26 ▼9.34
Media Library /wp-admin/upload.php1,810 ▼05.02 ▲0.01158.66 ▲0.61120.02 ▲6.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/simple-quotation/core.class.php+1698
    Methods with the same name as their class will not be constructors in a future version of PHP; coreSLframework has a deprecated constructor

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/simple-quotation/simple-quotation.php
    • > /wp-content/plugins/simple-quotation/core.class.php
    • > /wp-content/plugins/simple-quotation/core.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(core.php): failed to open stream: No such file or directory in wp-content/plugins/simple-quotation/core/templates/my-plugin.php on line 18
    • > PHP Fatal error
      require_once(): Failed opening required 'core.php' (include_path='.:/usr/share/php') in wp-content/plugins/simple-quotation/core/templates/my-plugin.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (The administration of quotes), #2 (The configuration page of the plugin), #3 (Examples of quote rendering)
You can take inspiration from this readme.txt

simple-quotation/core.class.php 85% from 13 tests

"Simple Quotation" version %s by %s', 'SL_framework'),$info['Version'],$info['Author']) ; ?> ()'s primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-quotation.php" instead of "core.class.php")
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "%s by %s', 'SL_framework'),$info['Version'],$info['Author']) ; ?> ()")

Code Analysis 97% from 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 detected16,981 lines of code in 74 files:
LanguageFilesBlank linesComment linesLines of code
PO File353,98508,721
PHP199351,7176,857
JavaScript6219254829
CSS108513459
Markdown120084
JSON10029
INI2002

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 119)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity49.68
▷ Minimum class complexity1.00
▷ Maximum class complexity211.00
Average method complexity7.05
▷ Minimum method complexity1.00
▷ Maximum method complexity119.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes15.26%
▷ Concrete classes1894.74%
▷ Final classes00.00%
Methods153
▷ Static methods3522.88%
▷ Public methods15098.04%
▷ Protected methods31.96%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
33 PNG files occupy 1.06MB with 0.51MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/img/tab_list.png0.52KB0.43KB▼ 17.07%
core/img/title_popup.png2.72KB0.20KB▼ 92.65%
img/icon-256x256.png118.61KB51.55KB▼ 56.53%
core/img/tree_lastnode_minus.png0.14KB0.12KB▼ 13.89%
img/icon-128x128.png36.64KB14.67KB▼ 59.98%