84% developer-loggers-for-simple-history

Code Review | Developer Loggers for Simple History

WordPress plugin Developer Loggers for Simple History scored 84% from 54 tests.

About plugin

  • Plugin page: developer-loggers...
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5
  • WordPress version: 6.3.1
  • First release: Dec 5, 2015
  • Latest release: Nov 25, 2016
  • Number of updates: 27
  • Update frequency: every 13.3 days
  • Top authors: eskapism (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 4,617 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.15ms] Passed 4 tests

Server-side resources used by Developer Loggers for Simple History
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.27 ▼0.48
Dashboard /wp-admin3.31 ▲0.0146.06 ▼5.99
Posts /wp-admin/edit.php3.36 ▲0.0044.81 ▼0.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.55 ▼25.81
Media Library /wp-admin/upload.php3.23 ▲0.0033.97 ▲1.13

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Developer Loggers for Simple History
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.29 ▼1.301.72 ▲0.1543.73 ▼0.34
Dashboard /wp-admin2,209 ▲215.83 ▼0.0495.29 ▼9.2640.63 ▼0.65
Posts /wp-admin/edit.php2,095 ▲61.97 ▼0.0333.31 ▼2.1435.90 ▼0.66
Add New Post /wp-admin/post-new.php1,539 ▲2522.97 ▲5.54596.17 ▼51.6051.00 ▲0.04
Media Library /wp-admin/upload.php1,394 ▲64.21 ▲0.05104.98 ▼4.4445.75 ▼1.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleLogger' not found in wp-content/plugins/developer-loggers-for-simple-history/loggers/Slackit.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleLogger' not found in wp-content/plugins/developer-loggers-for-simple-history/loggers/CPUUsageLogger.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleLogger' not found in wp-content/plugins/developer-loggers-for-simple-history/loggers/HTTP_Logger.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/developer-loggers-for-simple-history/tests/test-simplehistory-dev-loggers.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleLogger' not found in wp-content/plugins/developer-loggers-for-simple-history/loggers/FourOhFourLogger.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/developer-loggers-for-simple-history/developer_loggers.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleLogger' not found in wp-content/plugins/developer-loggers-for-simple-history/loggers/FrontEndClick_Logger.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleLogger' not found in wp-content/plugins/developer-loggers-for-simple-history/loggers/ErrorLog_Logger.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/developer-loggers-for-simple-history/templates/settings.php:8
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/developer-loggers-for-simple-history/tests/bootstrap.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: debug, wp_mail, developer, simple history, administrators...

developer-loggers-for-simple-history/developer_loggers.php 92% from 13 tests

The main PHP script in "Developer Loggers for Simple History" version 0.5 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("developer-loggers-for-simple-history.php" instead of "developer_loggers.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,111 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP19504325989
Bourne Shell121685
Markdown19020
XML11017

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.73
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods56
▷ Static methods11.79%
▷ Public methods56100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions317.65%
▷ Anonymous functions1482.35%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin