78% custom-functions

Code Review | Custom Functions Plugin

WordPress plugin Custom Functions Plugin scored78%from 54 tests.

About plugin

  • Plugin page: custom-functions
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-4.2
  • WordPress version: 6.3.1
  • First release: Apr 25, 2014
  • Latest release: May 23, 2015
  • Number of updates: 5
  • Update frequency: every 78.6 days
  • Top authors: shamim51 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /6,574 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼2.01ms] Passed 4 tests

A check of server-side resources used by Custom Functions Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1338.48 ▼1.89
Dashboard /wp-admin3.44 ▲0.1450.58 ▼1.10
Posts /wp-admin/edit.php3.56 ▲0.2048.18 ▼3.19
Add New Post /wp-admin/post-new.php6.02 ▲0.1395.69 ▲3.29
Media Library /wp-admin/upload.php3.37 ▲0.1339.98 ▼1.86

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please try to fix the following items
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/custom-functions/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
cfp_options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Functions Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.83 ▲0.241.59 ▼0.3141.23 ▼5.12
Dashboard /wp-admin2,222 ▲195.76 ▼0.11100.19 ▼4.7336.01 ▼6.64
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0339.14 ▲1.1037.78 ▼4.86
Add New Post /wp-admin/post-new.php1,539 ▲1323.22 ▲5.67608.13 ▼84.6857.85 ▼0.33
Media Library /wp-admin/upload.php1,407 ▲74.25 ▲0.13100.55 ▼5.3145.57 ▲2.72
Custom Functions Plugin /wp-admin/custom-functions-plugin.php260.440.0614.97

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • cfp_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
Please fix the following items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/custom-functions/all-custom-functions.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/custom-functions/all-custom-functions.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/custom-functions/all-custom-functions.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-functions/all-custom-functions.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-functions/all-custom-functions.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/custom-functions/all-custom-functions.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/custom-functions-plugin.php
    • > Network (severe)
    wp-admin/custom-functions-plugin.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: sidebar, function, wordpress function, shortcode, plugin...

custom-functions/custom-functions-plugin.php 85% from 13 tests

This is the main PHP file of "Custom Functions Plugin" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("custom-functions.php" instead of "custom-functions-plugin.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 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin612 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP213242612

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.62
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%
Functions35
▷ Named functions35100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG files were detected