74% motivational-quotes

Code Review | Motivating Quotes

WordPress plugin Motivating Quotes scored 74% from 54 tests.

About plugin

  • Plugin page: motivational-quotes
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.3
  • WordPress version: 5.8.1
  • First release: Apr 26, 2017
  • Latest release: Apr 26, 2017
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: motivationalquote (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 537 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼145.76ms] Passed 4 tests

Server-side resources used by Motivating Quotes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1342.83 ▲20.11
Dashboard /wp-admin3.08 ▲0.0244.11 ▼2.38
Posts /wp-admin/edit.php3.13 ▲0.0243.16 ▼3.12
Add New Post /wp-admin/post-new.php5.44 ▲0.0193.48 ▼568.01
Media Library /wp-admin/upload.php3.02 ▲0.0130.39 ▼9.51

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 8 new files
Database: 1 new table, 1 new option
New tables
wp_motivational_quotes
New WordPress options
motiv_quotes_db_version

Browser metrics Passed 4 tests

Motivating Quotes: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,750 ▲15416.12 ▲0.629.17 ▲0.8147.42 ▼3.85
Dashboard /wp-admin3,007 ▲715.91 ▼0.10137.15 ▼29.54118.98 ▲1.23
Posts /wp-admin/edit.php2,776 ▲372.68 ▼0.0170.98 ▲1.0187.21 ▼2.98
Add New Post /wp-admin/post-new.php1,697 ▲1418.96 ▲0.48372.40 ▼8.61106.84 ▼12.77
Media Library /wp-admin/upload.php1,844 ▲375.01 ▼0.01166.30 ▲20.48122.08 ▼5.38

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
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_motivational_quotes
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • motiv_quotes_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/motivational-quotes/includes/liste.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/motivational-quotes/includes/main-options.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/motivational-quotes/motivational-quotes.php:97
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/motivational-quotes/includes/liste.php on line 44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Render when a quote is displayed) image not found
The official readme.txt is a good inspiration

motivational-quotes/motivational-quotes.php 92% from 13 tests

The primary PHP file in "Motivating Quotes" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

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
There were no executable files found in this plugin216 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP35832200
CSS13016

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/quote.png0.48KB0.69KB0.00%
images/quote2.png0.57KB0.72KB0.00%
screenshot-1.PNG12.83KB7.34KB▼ 42.77%