83% custom-datepicker-nmr

Code Review | Custom Datepicker NMR

WordPress plugin Custom Datepicker NMR scored83%from 54 tests.

About plugin

  • Plugin page: custom-datepicker...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Feb 21, 2020
  • Latest release: Apr 6, 2023
  • Number of updates: 19
  • Update frequency: every 60.0 days
  • Top authors: mirceatm (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /6,254 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.45ms] Passed 4 tests

Server-side resources used by Custom Datepicker NMR
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.15 ▲0.89
Dashboard /wp-admin3.34 ▲0.0344.56 ▲0.13
Posts /wp-admin/edit.php3.39 ▲0.0348.56 ▲0.63
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.76 ▼8.37
Media Library /wp-admin/upload.php3.26 ▲0.0332.65 ▼2.20

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Custom Datepicker NMR
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲12313.97 ▼0.3210.09 ▲8.4144.97 ▼2.70
Dashboard /wp-admin2,195 ▲185.56 ▲0.0180.43 ▼4.9638.69 ▼3.67
Posts /wp-admin/edit.php2,100 ▲31.98 ▼0.0138.70 ▲1.5635.85 ▲1.33
Add New Post /wp-admin/post-new.php1,528 ▼923.42 ▲5.06696.55 ▲46.5951.62 ▼20.13
Media Library /wp-admin/upload.php1,394 ▼34.22 ▲0.0498.44 ▲0.0843.66 ▲1.61

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-datepicker-nmr/nmr-datepicker.php:13

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)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

custom-datepicker-nmr/nmr-datepicker.php 77% from 13 tests

The entry point to "Custom Datepicker NMR" version 1.0.7 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("custom-datepicker-nmr.php" instead of "nmr-datepicker.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,353 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS141481,222
PHP12511112
JavaScript10019

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
6 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_777777_256x240.png6.94KB4.18KB▼ 39.78%
css/images/ui-icons_444444_256x240.png6.92KB4.18KB▼ 39.61%
css/images/ui-icons_777620_256x240.png4.51KB4.18KB▼ 7.28%
css/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
css/images/ui-icons_cc0000_256x240.png4.51KB4.18KB▼ 7.28%