68% custom-fields-notifications

Code Review | Custom Fields Notifications

WordPress plugin Custom Fields Notifications scored68%from 54 tests.

About plugin

  • Plugin page: custom-fields-not...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.0
  • WordPress version: 6.3.1
  • First release: Feb 8, 2014
  • Latest release: Oct 3, 2014
  • Number of updates: 3
  • Update frequency: every 79.3 days
  • Top authors: alimir (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /1,843 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼30.38ms] Passed 4 tests

This is a short check of server-side resources used by Custom Fields Notifications
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.21 ▼4.17
Dashboard /wp-admin3.00 ▼0.3129.71 ▼21.86
Posts /wp-admin/edit.php3.00 ▼0.3623.54 ▼21.25
Add New Post /wp-admin/post-new.php3.00 ▼2.8923.55 ▼74.25
Media Library /wp-admin/upload.php3.00 ▼0.2327.64 ▼3.96
Custom Fields Notifications /wp-admin/options-general.php?page=custom-fields-notifications/inc/wp-options.php3.0023.13

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
cfn_auto_display
cfn_theme
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
cfn_hide_effect
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Custom Fields Notifications
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲15213.67 ▼0.715.53 ▲3.8637.24 ▼7.15
Dashboard /wp-admin2,213 ▲285.79 ▼0.0793.94 ▼2.4237.83 ▼1.21
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0640.03 ▲2.1135.05 ▲1.77
Add New Post /wp-admin/post-new.php1,517 ▼1617.66 ▼5.55624.75 ▼60.9956.51 ▼6.12
Media Library /wp-admin/upload.php1,392 ▲44.25 ▼0.0697.58 ▼11.1946.06 ▲1.98
Custom Fields Notifications /wp-admin/options-general.php?page=custom-fields-notifications/inc/wp-options.php8982.1527.6631.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% 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
    • > GET request to /wp-admin/options-general.php?page=custom-fields-notifications/inc/wp-options.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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
The following issues need your attention
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/custom-fields-notifications/inc/wp-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/custom-fields-notifications/alimir-custom-fields-notifications.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-fields-notifications/inc/wp-scripts.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-fields-notifications/inc/wp-options.php:2

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 Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: custom fields message, wordpress notifications box, notifications, wordpress custom fields

custom-fields-notifications/alimir-custom-fields-notifications.php 85% from 13 tests

The main PHP file in "Custom Fields Notifications" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("custom-fields-notifications.php" instead of "alimir-custom-fields-notifications.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 204 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected451 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS204208
PHP53021177
PO File118065961
JavaScript1015

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions11
▷ Named functions11100.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 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/email.png1.01KB1.03KB0.00%
assets/images/information.png2.06KB1.65KB▼ 20.03%
assets/images/exclamation.png1.96KB1.64KB▼ 16.33%
assets/images/accept.png1.82KB1.62KB▼ 10.74%
assets/images/error.png1.15KB1.22KB0.00%