84% custom-php-settings

Code Review | Custom PHP Settings

WordPress plugin Custom PHP Settings scored84%from 54 tests.

About plugin

  • Plugin page: custom-php-settings
  • Plugin version: 1.4.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 25, 2019
  • Latest release: Aug 13, 2023
  • Number of updates: 106
  • Update frequency: every 15.9 days
  • Top authors: cyclonecode (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

10,000+ active /219,245 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.25MB] [CPU: ▲0.98ms] Passed 4 tests

Analyzing server-side resources used by Custom PHP Settings
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.19 ▼3.07
Dashboard /wp-admin3.65 ▲0.3552.41 ▼2.53
Posts /wp-admin/edit.php3.70 ▲0.3552.79 ▲4.36
Add New Post /wp-admin/post-new.php6.17 ▲0.2897.36 ▲5.15
Media Library /wp-admin/upload.php3.51 ▲0.2840.27 ▲5.98
Custom PHP Settings /wp-admin/tools.php?page=custom-php-settings3.5138.83

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
custom_php_settings

Browser metrics Passed 4 tests

A check of browser resources used by Custom PHP Settings
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.431.73 ▼0.3442.39 ▼4.97
Dashboard /wp-admin2,202 ▲225.57 ▼0.0892.24 ▲4.4743.37 ▲1.04
Posts /wp-admin/edit.php2,104 ▲11.97 ▼0.0144.54 ▲0.4135.49 ▼0.64
Add New Post /wp-admin/post-new.php1,530 ▼723.03 ▼0.32671.32 ▼17.2753.04 ▲2.93
Media Library /wp-admin/upload.php1,407 ▲74.19 ▲0.02111.07 ▲9.5948.49 ▲2.00
Custom PHP Settings /wp-admin/tools.php?page=custom-php-settings1,1904.0892.8238.84

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CustomPhpSettings\\add_action() in wp-content/plugins/custom-php-settings/bootstrap.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/custom-php-settings/src/Backend/views/cps-php-info.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CustomPhpSettings\\Plugin\\Common\\Singleton' not found in wp-content/plugins/custom-php-settings/src/Backend/Backend.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/custom-php-settings/src/Backend/views/cps-status.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/custom-php-settings/src/Backend/views/cps-tabs.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/custom-php-settings/src/Backend/views/cps-general.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/custom-php-settings/src/Backend/views/cps-tabs.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/custom-php-settings/src/Backend/views/cps-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/custom-php-settings/src/Backend/views/cps-tabs.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/custom-php-settings/src/Backend/views/cps-apache.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: htaccess, apache, php, apache2, settings

custom-php-settings/bootstrap.php 85% from 13 tests

"Custom PHP Settings" version 1.4.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("custom-php-settings.php" instead of "bootstrap.php")

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
Success! There were no dangerous files found in this plugin2,406 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP242578002,034
JSON200210
JavaScript202102
CSS10360

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity27.86
▷ Minimum class complexity1.00
▷ Maximum class complexity84.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods114
▷ Static methods2824.56%
▷ Public methods9381.58%
▷ Protected methods1513.16%
▷ Private methods65.26%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.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
2 PNG files occupy 0.37MB with 0.20MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/Backend/assets/icon-128x128.png25.56KB15.67KB▼ 38.68%
src/Backend/assets/buymeacoffee.png357.15KB117.12KB▼ 67.21%