10% spanish-quote-of-the-day-frase-del-dia

Code Review | Spanish Quote of the Day

WordPress plugin Spanish Quote of the Day scored10%from 54 tests.

About plugin

  • Plugin page: spanish-quote-of-...
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.8
  • WordPress version: 6.3.1
  • First release: May 30, 2014
  • Latest release: Sep 9, 2018
  • Number of updates: 31
  • Update frequency: every 50.4 days
  • Top authors: jmviade (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /3,444 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/spanish-quote-of-the-day-frase-del-dia/spanish-quotes.php+20
    define(): Declaration of case-insensitive constants is deprecated

Server metrics [RAM: ▼1.94MB] [CPU: ▼54.75ms] Passed 4 tests

A check of server-side resources used by Spanish Quote of the Day
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.81 ▼39.24
Dashboard /wp-admin2.07 ▼1.236.00 ▼45.89
Posts /wp-admin/edit.php2.07 ▼1.295.77 ▼44.61
Add New Post /wp-admin/post-new.php2.07 ▼3.826.21 ▼89.26
Media Library /wp-admin/upload.php2.07 ▼1.165.68 ▼28.04
Spanish Quotes /wp-admin/options-general.php?page=spanish_quotes_settings2.075.68

Server storage [IO: ▲0.74MB] [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, 8 new options
New WordPress options
cool-quotes-ver
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_sqod_quotes

Browser metrics Passed 4 tests

An overview of browser requirements for Spanish Quote of the Day
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲12713.59 ▼0.642.08 ▲0.1141.93 ▼2.56
Dashboard /wp-admin2,210 ▲254.84 ▼0.02109.23 ▼9.8940.61 ▼6.10
Posts /wp-admin/edit.php2,093 ▲42.00 ▲0.0341.12 ▲5.6033.67 ▼1.14
Add New Post /wp-admin/post-new.php1,523 ▼1123.35 ▲0.12678.18 ▼16.6953.09 ▼5.12
Media Library /wp-admin/upload.php1,395 ▲74.23 ▼0.0797.48 ▼7.8643.61 ▼1.93
Spanish Quotes /wp-admin/options-general.php?page=spanish_quotes_settings1,0341.9534.4464.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/spanish-quote-of-the-day-frase-del-dia/spanish-quotes.php+20
    define(): Declaration of case-insensitive constants is deprecated
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_sqod_quotes
    • db_upgraded
    • widget_recent-comments
    • cool-quotes-ver
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=spanish_quotes_settings
    • > Deprecated in wp-content/plugins/spanish-quote-of-the-day-frase-del-dia/spanish-quotes.php+21
    define(): Declaration of case-insensitive constants is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=spanish_quotes_settings
    • > Notice in wp-content/plugins/spanish-quote-of-the-day-frase-del-dia/includes/backend-interface.php+106
    Trying to access array offset on value of type bool
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=spanish_quotes_settings
    • > Warning in wp-content/plugins/spanish-quote-of-the-day-frase-del-dia/includes/messages-interface.php+136
    Use of undefined constant WPLANG - assumed 'WPLANG' (this will throw an Error in a future version of PHP)

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/spanish-quote-of-the-day-frase-del-dia/includes/widget-interface.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/spanish-quote-of-the-day-frase-del-dia/spanish-quotes.php:20

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: frases clebres, random quotes, quotes, frase del dia, frases...

spanish-quote-of-the-day-frase-del-dia/spanish-quotes.php 85% from 13 tests

The main file in "Spanish Quote of the Day" v. 1.4.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 351 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("spanish-quote-of-the-day-frase-del-dia.php" instead of "spanish-quotes.php")

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
There were no executable files found in this plugin866 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4214177587
PO File1100183235
CSS222034
JavaScript222510

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity9.33
▷ Minimum class complexity5.00
▷ Maximum class complexity16.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods48
▷ Static methods2654.17%
▷ Public methods48100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin