79% custom-logging-service

Code Review | Custom Logging Service

WordPress plugin Custom Logging Service scored 79% from 54 tests.

About plugin

  • Plugin page: custom-logging-se...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Feb 8, 2016
  • Latest release: Dec 9, 2016
  • Number of updates: 6
  • Update frequency: every 50.8 days
  • Top authors: ccprog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,133 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▲0.93ms] Passed 4 tests

A check of server-side resources used by Custom Logging Service
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2142.28 ▲2.30
Dashboard /wp-admin3.50 ▲0.2055.74 ▲4.95
Posts /wp-admin/edit.php3.62 ▲0.2653.09 ▲1.58
Add New Post /wp-admin/post-new.php6.08 ▲0.2096.27 ▼5.11
Media Library /wp-admin/upload.php3.42 ▲0.2039.19 ▲5.98
Application logs /wp-admin/index.php?page=clgs_manager3.3734.50
Custom Logging Service /wp-admin/options-general.php?page=clgs_options3.3933.41

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: 2 new tables, 7 new options
New tables
wp_clgs_logs
wp_clgs_entries
New WordPress options
widget_recent-comments
clgs_version
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Custom Logging Service
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7314.48 ▲0.101.65 ▼0.0839.82 ▼8.98
Dashboard /wp-admin2,214 ▲234.88 ▼1.02106.32 ▲0.2740.25 ▼0.94
Posts /wp-admin/edit.php2,097 ▲82.18 ▲0.1738.51 ▼2.1934.03 ▼3.17
Add New Post /wp-admin/post-new.php1,544 ▲1622.90 ▲4.54632.34 ▼10.9451.57 ▼4.27
Media Library /wp-admin/upload.php1,399 ▲114.14 ▼0.0395.43 ▼5.2544.41 ▲0.09
Application logs /wp-admin/index.php?page=clgs_manager1,0902.0927.1330.34
Custom Logging Service /wp-admin/options-general.php?page=clgs_options9032.0323.8327.02

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/index.php?page=clgs_manager
    • > Notice in wp-content/plugins/custom-logging-service/includes/class-manager-table.php+130
    compact(): Undefined variable: category

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/custom-logging-service/custom-logging-service.php:74
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/custom-logging-service/includes/settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-logging-service/includes/manager.php:89
    • > 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-logging-service/includes/class-manager-table.php on line 3
    • > PHP Warning
      require(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/custom-logging-service/includes/class-manager-table.php on line 3
    • > PHP Fatal error
      require(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/custom-logging-service/includes/class-manager-table.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: logging

custom-logging-service/custom-logging-service.php Passed 13 tests

"Custom Logging Service" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
101 characters long description:
Provides a simple API for storing miscellaneous log entries and displays them in a Dashboard subpage.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,251 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP72126911,036
PO File25867146
CSS10052
JavaScript11017

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity15.67
▷ Minimum class complexity6.00
▷ Maximum class complexity25.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions31
▷ Named functions2993.55%
▷ Anonymous functions26.45%
Constants14
▷ Global constants1392.86%
▷ Class constants17.14%
▷ Public constants1100.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
There were not PNG files found in your plugin