10% automatic-quotes

Code Review | Automatic Quotes

WordPress plugin Automatic Quotes scored10%from 54 tests.

About plugin

  • Plugin page: automatic-quotes
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Aug 4, 2013
  • Latest release: Apr 19, 2014
  • Number of updates: 28
  • Update frequency: every 9.3 days
  • Top authors: Tech Piper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,524 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/automatic-quotes/automatic-quotes.php+53
    Methods with the same name as their class will not be constructors in a future version of PHP; QP_Quotes has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼57.50ms] Passed 4 tests

Server-side resources used by Automatic Quotes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.51 ▼38.55
Dashboard /wp-admin2.08 ▼1.226.40 ▼46.62
Posts /wp-admin/edit.php2.09 ▼1.277.69 ▼48.38
Add New Post /wp-admin/post-new.php2.08 ▼3.805.58 ▼96.43
Media Library /wp-admin/upload.php2.08 ▼1.145.41 ▼33.40

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_qp-quotes
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Automatic Quotes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.29 ▼0.201.74 ▼0.1939.90 ▼0.93
Dashboard /wp-admin2,195 ▲185.62 ▲0.0089.87 ▲2.0539.91 ▼2.72
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0536.73 ▼6.2435.77 ▼0.68
Add New Post /wp-admin/post-new.php1,526 ▼923.25 ▲4.88632.95 ▼47.6252.35 ▼15.37
Media Library /wp-admin/upload.php1,397 ▼34.26 ▲0.0999.56 ▼19.7243.13 ▼6.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/automatic-quotes/automatic-quotes.php+53
    Methods with the same name as their class will not be constructors in a future version of PHP; QP_Quotes has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_qp-quotes

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/automatic-quotes/automatic-quotes.php:31

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 97% 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
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === automatic-quotes === )
Please take inspiration from this readme.txt

automatic-quotes/automatic-quotes.php Passed 13 tests

The principal PHP file in "Automatic Quotes" v. 2.1 is loaded by WordPress automatically on each request
59 characters long description:
Get new interesting quotes delivered daily to your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected104 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2536676
CSS13028

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot - 1.png33.66KB16.42KB▼ 51.22%
images/qp-logo2.png5.74KB2.70KB▼ 52.94%