79% daily-maxim-365

Code Review | Daily Maxim 365

WordPress plugin Daily Maxim 365 scored79%from 54 tests.

About plugin

  • Plugin page: daily-maxim-365
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Apr 16, 2021
  • Latest release: Apr 16, 2021
  • Number of updates: 11
  • Update frequency: every 0.1 days
  • Top authors: minesuke (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /441 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.57MB] [CPU: ▲0.15ms] Passed 4 tests

This is a short check of server-side resources used by Daily Maxim 365
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3442.90 ▼0.31
Dashboard /wp-admin3.95 ▲0.6554.11 ▲3.18
Posts /wp-admin/edit.php4.05 ▲0.7053.39 ▲0.63
Add New Post /wp-admin/post-new.php6.53 ▲0.6597.75 ▼2.92
Media Library /wp-admin/upload.php3.87 ▲0.6542.63 ▲8.39
Add Phrase /wp-admin/admin.php?page=add-phrase4.0542.07
List Sources /wp-admin/admin.php?page=disp-list-sources3.9541.88
Daily Maxim 365 /wp-admin/admin.php?page=daily-maxim-3654.0939.28
Settings /wp-admin/admin.php?page=Settings4.2441.74
Add Source /wp-admin/admin.php?page=add-source3.9238.96

Server storage [IO: ▲0.37MB] [DB: ▲0.03MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 75 new files
Database: 2 new tables, 7 new options
New tables
wp_msdm3_source_mst
wp_msdm3_maxim_mst
New WordPress options
can_compress_scripts
daily-maxim-365
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Daily Maxim 365
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲12713.43 ▼0.838.22 ▲5.9940.39 ▼4.09
Dashboard /wp-admin2,234 ▲605.57 ▲0.0390.19 ▼0.5241.50 ▲2.56
Posts /wp-admin/edit.php2,139 ▲392.01 ▼0.0139.68 ▲1.8535.24 ▲1.99
Add New Post /wp-admin/post-new.php1,557 ▲2023.43 ▲4.90682.04 ▲57.5557.13 ▼6.57
Media Library /wp-admin/upload.php1,436 ▲364.20 ▲0.0797.59 ▼1.1241.76 ▼5.14
Add Phrase /wp-admin/admin.php?page=add-phrase1,6672.2030.19154.43
List Sources /wp-admin/admin.php?page=disp-list-sources1,2162.0824.2046.90
Daily Maxim 365 /wp-admin/admin.php?page=daily-maxim-3651,7722.0824.34129.41
Settings /wp-admin/admin.php?page=Settings2,3772.0627.43299.19
Add Source /wp-admin/admin.php?page=add-source8822.0724.2327.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/daily-maxim-365/app/templates/admin/errors/requirements-error.php
  • 43× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/daily-maxim-365/app/templates/admin/page-settings/page-settings-selecbox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/daily-maxim-365/app/templates/frontend/page-frontend-phrases.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Daily_Maxim_365\\App\\Models\\Admin\\Base_Model' not found in wp-content/plugins/daily-maxim-365/app/models/admin/class-admin-phrases.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/daily-maxim-365/app/templates/admin/page-settings/page-sources.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Daily_Maxim_365\\Core\\Model' not found in wp-content/plugins/daily-maxim-365/app/models/class-settings.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Daily_Maxim_365\\Core\\View' not found in wp-content/plugins/daily-maxim-365/app/views/admin/class-admin-settings.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/daily-maxim-365/app/templates/admin/page-settings/page-settings-fields.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/daily-maxim-365/app/templates/admin/errors/admin-notice.php:3
    • > PHP Notice
      Undefined variable: router in wp-content/plugins/daily-maxim-365/routes.php on line 135
    • > PHP Fatal error
      Uncaught Error: Class 'Daily_Maxim_365\\App\\Controllers\\Frontend\\Base_Controller' not found in wp-content/plugins/daily-maxim-365/app/controllers/frontend/class-frontend-phrases.php:24

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: maxim, daily, quotations, quotes, phrase

daily-maxim-365/daily-maxim-365.php Passed 13 tests

"Daily Maxim 365" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
108 characters long description:
A plugin that displays phrases that change daily. These phrases may sometimes cheer up or encourage someone.

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
Everything looks great! No dangerous files found in this plugin5,364 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
PHP571,3113,0934,468
CSS39337463
PO File187151217
JavaScript25974212
Markdown4004

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.34
Average class complexity11.18
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces11
Interfaces0
Traits1
Classes38
▷ Abstract classes513.16%
▷ Concrete classes3386.84%
▷ Final classes00.00%
Methods226
▷ Static methods5223.01%
▷ Public methods18782.74%
▷ Protected methods229.73%
▷ Private methods177.52%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants31
▷ Global constants13.23%
▷ Class constants3096.77%
▷ Public constants30100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/frontend/back_makimono_kimidori.png0.87KB0.36KB▼ 58.65%