67% next-tiny-date

Code Review | Next Tiny Date

WordPress plugin Next Tiny Date scored67%from 54 tests.

About plugin

  • Plugin page: next-tiny-date
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Jan 5, 2023
  • Latest release: Aug 9, 2023
  • Number of updates: 88
  • Update frequency: every 2.6 days
  • Top authors: nxtweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /257 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.39MB] [CPU: ▼1.45ms] Passed 4 tests

Server-side resources used by Next Tiny Date
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3340.37 ▲1.75
Dashboard /wp-admin3.72 ▲0.4255.60 ▲8.82
Posts /wp-admin/edit.php3.84 ▲0.4951.15 ▲3.93
Add New Post /wp-admin/post-new.php6.31 ▲0.4282.04 ▼14.12
Media Library /wp-admin/upload.php3.63 ▲0.4037.22 ▲2.65
Planning /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_view3.9834.46
Stats /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats3.9835.00
Next Tiny Date /wp-admin/admin.php?page=ntdt-acp3.9834.24
General Settings /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_settings3.9835.22
Help /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_help3.9831.41

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 20 new files
Database: 1 new table, 9 new options
New tables
wp_ntdtRV
New WordPress options
can_compress_scripts
widget_recent-comments
optVersionDB
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
ntdtCurrentType
ntdtCurrentVersion

Browser metrics Passed 4 tests

A check of browser resources used by Next Tiny Date
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,980 ▲20914.78 ▲0.411.94 ▲0.1644.86 ▲1.78
Dashboard /wp-admin2,386 ▲1986.47 ▲1.58141.98 ▲38.0841.98 ▼1.34
Posts /wp-admin/edit.php2,292 ▲2033.36 ▲1.3247.50 ▲12.3329.74 ▼6.87
Add New Post /wp-admin/post-new.php1,549 ▲1717.67 ▼5.39616.42 ▼35.3433.94 ▼23.90
Media Library /wp-admin/upload.php1,434 ▲434.13 ▼0.0882.24 ▼16.3040.46 ▼3.13
Planning /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_view1,1303.1243.7491.77
Stats /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats1,0663.0638.0678.72
Next Tiny Date /wp-admin/admin.php?page=ntdt-acp1,1303.0439.4671.69
General Settings /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_settings1,3493.0438.7486.30
Help /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_help1,0423.0239.6577.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_ntdtRV
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • ntdtCurrentVersion
    • optVersionDB
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • ntdtCurrentType
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_help
    • > Notice in wp-content/plugins/next-tiny-date/includes/ntdt-acp-page.php+224
    Undefined index: section
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ntdt-acp
    • > Notice in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php+479
    Undefined variable: A_RVs
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ntdt-acp
    • > Warning in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php+479
    count(): Parameter must be an array or an object that implements Countable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ntdt-acp
    • > Notice in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php+480
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats
    • > Warning in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php+1436
    Division by zero
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats
    • > Warning in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php+1514
    imagefilledarc() expects parameter 7 to be int, float given
  • 215 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats
    • > Warning in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php+1514
    imagefilledarc() expects parameter 6 to be int, float given
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats
    • > Warning in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php+1574
    imageline() expects parameter 3 to be int, float given
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats
    • > Warning in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php+1577
    imagettftext() expects parameter 5 to be int, float given
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats
    • > Notice in wp-content/plugins/next-tiny-date/includes/ntdt-acp-page.php+834
    Undefined variable: A_NbReasons
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats
    • > Notice in wp-content/plugins/next-tiny-date/includes/ntdt-acp-page.php+834
    Undefined variable: A_Reasons
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats
    • > Warning in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php+1364
    imagecreatetruecolor(): Invalid image dimensions
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats
    • > Warning in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php+1426
    imagecolorallocate() expects parameter 1 to be resource, bool given
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats
    • > Warning in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php+1366
    imagefill() expects parameter 1 to be resource, bool given
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats
    • > Warning in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php+1367
    imagecolortransparent() expects parameter 1 to be resource, bool given
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats
    • > Warning in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php+1437
    imageline() expects parameter 1 to be resource, bool given
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats
    • > Warning in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php+1435
    imagesetstyle() expects parameter 1 to be resource, bool given
    • > GET request to /wp-admin/admin.php?page=ntdt-acp&tab=ntdt_stats
    • > Warning in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php+1438
    imagettftext() expects parameter 1 to be resource, bool given
    • > GET request to /wp-admin/admin.php?page=ntdt-acp
    • > Notice in wp-content/plugins/next-tiny-date/includes/ntdt-acp-page.php+222
    Undefined index: tab

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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/next-tiny-date/next-tiny-date.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/next-tiny-date/includes/ntdt-acp-page.php:82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/next-tiny-date/includes/ntdt-functions.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #5 (Booking appointment plugin website integration.) image required
  • Screenshots: Add a description for screenshot #0 in next-tiny-date/assets to your readme.txt
  • Requires php: Invalid plugin version format
Please take inspiration from this readme.txt

next-tiny-date/next-tiny-date.php 92% from 13 tests

The main PHP script in "Next Tiny Date" version 3.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 763 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
There were no executable files found in this plugin2,942 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4295352,198
PO File1373619320
JavaScript290101311
CSS2103113

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
4 PNG files occupy 0.03MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-help.png5.14KB0.54KB▼ 89.40%
images/ntdt-lock.png8.45KB0.55KB▼ 93.51%
images/ntdt-trash.png9.64KB0.76KB▼ 92.15%
images/ntdt-unlock.png8.98KB0.56KB▼ 93.76%