72% daily-proverb

Code Review | Daily Proverb

WordPress plugin Daily Proverb scored72%from 54 tests.

About plugin

  • Plugin page: daily-proverb
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.4.2
  • WordPress version: 6.3.1
  • First release: Sep 17, 2015
  • Latest release: Feb 16, 2016
  • Number of updates: 38
  • Update frequency: every 4.0 days
  • Top authors: jd7777 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /1,892 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.06ms] Passed 4 tests

An overview of server-side resources used by Daily Proverb
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.14 ▲0.11
Dashboard /wp-admin3.36 ▲0.0645.06 ▼7.65
Posts /wp-admin/edit.php3.41 ▲0.0643.26 ▼4.10
Add New Post /wp-admin/post-new.php5.96 ▲0.0881.60 ▼13.65
Media Library /wp-admin/upload.php3.29 ▲0.0632.49 ▼2.85
Verses /wp-admin/admin.php?page=dpv-verses3.2729.38
Versions /wp-admin/admin.php?page=dpv-versions3.5530.09

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 63 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
jwdpv0001_bible
widget_recent-posts
jwdpv0001_proverbs
jwdpv0001_otd

Browser metrics Passed 4 tests

An overview of browser requirements for Daily Proverb
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.85 ▲0.561.74 ▼0.0244.69 ▲0.87
Dashboard /wp-admin2,225 ▲435.90 ▲0.02102.30 ▼2.4336.17 ▼9.03
Posts /wp-admin/edit.php2,114 ▲252.08 ▲0.0435.82 ▼3.0331.41 ▼1.83
Add New Post /wp-admin/post-new.php1,549 ▲1423.36 ▼0.03658.62 ▼7.6255.31 ▼12.03
Media Library /wp-admin/upload.php1,413 ▲284.23 ▲0.0295.62 ▼1.2441.20 ▼3.48
Verses /wp-admin/admin.php?page=dpv-verses1,5711.9425.5840.98
Versions /wp-admin/admin.php?page=dpv-versions5,0892.4944.8369.68

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 76 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dpv-versions
    • > Notice in wp-content/plugins/daily-proverb/libs/html/admin.version.html.php+17
    Only variables should be passed by reference

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/daily-proverb/libs/php/shortcodes.php
    • > /wp-content/plugins/daily-proverb/libs/html/promoadd.php
    • > /wp-content/plugins/daily-proverb/libs/php/admin.php
    • > /wp-content/plugins/daily-proverb/libs/php/functions.php
    • > /wp-content/plugins/daily-proverb/index.php
    • > /wp-content/plugins/daily-proverb/init.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant JWDPV0001_HTML_PATH - assumed 'JWDPV0001_HTML_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/daily-proverb/libs/html/admin.verses.html.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/daily-proverb/libs/html/credits.php:2
    • > PHP Warning
      include(JWDPV0001_HTML_PATHpromoadd.php): failed to open stream: No such file or directory in wp-content/plugins/daily-proverb/libs/html/admin.version.html.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/daily-proverb/libs/html/admin.version.html.php:5
    • > PHP Warning
      include(JWDPV0001_HTML_PATHpromoadd.php): failed to open stream: No such file or directory in wp-content/plugins/daily-proverb/libs/html/admin.verses.html.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/daily-proverb/libs/html/admin.verses.html.php:5
    • > PHP Warning
      Use of undefined constant JWDPV0001_HTML_PATH - assumed 'JWDPV0001_HTML_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/daily-proverb/libs/html/admin.version.html.php on line 3
    • > PHP Warning
      include(): Failed opening 'JWDPV0001_HTML_PATHpromoadd.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/daily-proverb/libs/html/admin.version.html.php on line 3
    • > PHP Warning
      include(): Failed opening 'JWDPV0001_HTML_PATHpromoadd.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/daily-proverb/libs/html/admin.verses.html.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (screenshot-1.jpg) image required
You can take inspiration from this readme.txt

daily-proverb/index.php 92% from 13 tests

The main PHP file in "Daily Proverb" ver. 2.0.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("daily-proverb.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin1,886 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
JSON39001,049
PHP1051300316
PO File5104187300
LESS1180114
JavaScript1126106
CSS1011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions17
▷ Named functions1482.35%
▷ Anonymous functions317.65%
Constants7
▷ Global constants7100.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
No PNG images were found in this plugin