84% daily-quotes-socrates

Code Review | Daily Quotes Socrates

WordPress plugin Daily Quotes Socrates scored 84% from 54 tests.

About plugin

  • Plugin page: daily-quotes-socr...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 22, 2017
  • Latest release: Feb 21, 2020
  • Number of updates: 10
  • Update frequency: every 109.2 days
  • Top authors: gsuryalss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 589 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.59ms] Passed 4 tests

This is a short check of server-side resources used by Daily Quotes Socrates
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.65 ▼4.43
Dashboard /wp-admin3.34 ▲0.0447.35 ▼0.23
Posts /wp-admin/edit.php3.39 ▲0.0451.44 ▲0.25
Add New Post /wp-admin/post-new.php5.92 ▲0.0496.53 ▼13.73
Media Library /wp-admin/upload.php3.27 ▲0.0435.87 ▲0.04

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_socratesquote_randomquotewidget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Daily Quotes Socrates
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.74 ▲0.321.87 ▼0.0340.47 ▼0.06
Dashboard /wp-admin2,206 ▲185.85 ▲0.94110.92 ▲3.6342.70 ▲0.64
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0138.14 ▼0.6934.25 ▼0.60
Add New Post /wp-admin/post-new.php1,533 ▲1423.30 ▲0.12651.62 ▼12.6754.72 ▲0.70
Media Library /wp-admin/upload.php1,391 ▲64.20 ▼0.0897.86 ▼9.0343.69 ▲0.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_socratesquote_randomquotewidget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/daily-quotes-socrates/daily-quotes-socrates.php:112

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used 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 14 tag instead of maximum 10
The official readme.txt might help

daily-quotes-socrates/daily-quotes-socrates.php Passed 13 tests

The main file in "Daily Quotes Socrates" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
49 characters long description:
Displays random Socrates quotes over the website.

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 plugin123 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11847123

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ 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
PNG images were not found in this plugin