77% custom-functions-starter-kit

Code Review | Custom Functions Starter Kit by DraftPress

WordPress plugin Custom Functions Starter Kit by DraftPress scored77%from 54 tests.

About plugin

  • Plugin page: custom-functions-...
  • Plugin version: 2.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0.1
  • WordPress version: 6.3.1
  • First release: Mar 4, 2015
  • Latest release: Aug 6, 2022
  • Number of updates: 16
  • Update frequency: every 169.8 days
  • Top authors: 99robots (81.25%)WPMonty (25%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,398 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.74ms] Passed 4 tests

Server-side resources used by Custom Functions Starter Kit by DraftPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.1037.85 ▼1.00
Dashboard /wp-admin3.41 ▲0.1045.30 ▼3.12
Posts /wp-admin/edit.php3.52 ▲0.1647.32 ▼0.16
Add New Post /wp-admin/post-new.php5.99 ▲0.1081.36 ▼6.17
Media Library /wp-admin/upload.php3.33 ▲0.1035.01 ▼0.65
Custom Functions /wp-admin/tools.php?page=custom-functions-admin-menu-settings3.3032.53

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Custom Functions Starter Kit by DraftPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.22 ▼1.321.68 ▼0.1840.61 ▼1.44
Dashboard /wp-admin2,210 ▲224.87 ▼1.02101.87 ▼4.5137.66 ▼8.55
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0339.98 ▼3.8835.60 ▼1.90
Add New Post /wp-admin/post-new.php1,517 ▼1618.04 ▼5.45665.43 ▲62.0159.92 ▼2.51
Media Library /wp-admin/upload.php1,392 ▲14.21 ▼0.0393.78 ▼4.0940.92 ▼1.74
Custom Functions /wp-admin/tools.php?page=custom-functions-admin-menu-settings1,3552.2743.8373.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/custom-functions-starter-kit/admin/sidebar.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/custom-functions-starter-kit/admin/header.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/custom-functions-starter-kit/admin/header.php:7

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)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/tools.php?page=custom-functions-admin-menu-settings
    • > Network (severe)
    http://feeds.feedburner.com/99robots?format=sigpro - Failed to load resource: net::ERR_BLOCKED_BY_RESPONSE.NotSameSite

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI ("")
The official readme.txt might help

custom-functions-starter-kit/custom-functions-starter-kit.php 85% from 13 tests

The main PHP file in "Custom Functions Starter Kit by DraftPress" ver. 2.1.7 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected10,050 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
CSS747506,954
JavaScript37433322,230
PHP6195287603
SVG100229
Markdown117034

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity31.00
▷ Minimum class complexity3.00
▷ Maximum class complexity59.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods38
▷ Static methods12.63%
▷ Public methods2976.32%
▷ Protected methods615.79%
▷ Private methods37.89%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 0.59MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/avatar-gray-50.png6.39KB2.24KB▼ 64.96%
img/rainbow-strip-hz-wide.png3.24KB0.57KB▼ 82.36%
img/logo-only-80h@2x.png24.48KB8.09KB▼ 66.96%
img/ad-custom-development@2x.png119.94KB54.91KB▼ 54.22%
screenshot-3.png80.25KB31.04KB▼ 61.32%