10% daily-inspiration

Code Review | Inspirational Quotes

WordPress plugin Inspirational Quotes scored10%from 54 tests.

About plugin

  • Plugin page: daily-inspiration
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.6.1
  • WordPress version: 6.3.1
  • First release: Jan 24, 2013
  • Latest release: Oct 21, 2013
  • Number of updates: 5
  • Update frequency: every 56.2 days
  • Top authors: ronbeauchamp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,938 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
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method inspirational_quotes::activate() should not be called statically

Server metrics [RAM: ▼11.73MB] [CPU: ▼2,082,987.00ms] Passed 4 tests

Analyzing server-side resources used by Inspirational Quotes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.42 ▼1.099.33 ▼34.93
Dashboard /wp-admin2.43 ▼41.3812.99 ▼8,331,785.42
Posts /wp-admin/edit.php2.43 ▼0.9712.66 ▼41.07
Add New Post /wp-admin/post-new.php2.43 ▼3.5012.94 ▼86.58
Media Library /wp-admin/upload.php2.43 ▼0.8413.50 ▼22.05

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
inspirational_quotes
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Inspirational Quotes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.38 ▲0.041.71 ▲0.0743.82 ▲5.59
Dashboard /wp-admin2,192 ▲125.51 ▼0.1584.60 ▼2.6240.41 ▼4.92
Posts /wp-admin/edit.php2,097 ▼61.97 ▲0.0239.15 ▼3.5737.06 ▼2.78
Add New Post /wp-admin/post-new.php1,526 ▼023.07 ▼0.06665.16 ▲19.0063.40 ▲4.20
Media Library /wp-admin/upload.php1,400 ▲64.20 ▲0.0198.00 ▼4.5947.50 ▲0.46

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method inspirational_quotes::register() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
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 add_action() in wp-content/plugins/daily-inspiration/dailyinspiration.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Super-Simple settings within the widget), #2 (Sample Implementation), #3 (Another Sample Implementation)
Please take inspiration from this readme.txt

daily-inspiration/dailyinspiration.php 85% from 13 tests

The main PHP file in "Inspirational Quotes" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("daily-inspiration.php" instead of "dailyinspiration.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 222 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin806 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP140012806

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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
3 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png25.94KB8.55KB▼ 67.05%
screenshot-2.png11.24KB3.56KB▼ 68.34%
screenshot-3.png12.89KB4.08KB▼ 68.32%