84% logbook

Code Review | Logbook

WordPress plugin Logbook scored84%from 54 tests.

About plugin

  • Plugin page: logbook
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9
  • WordPress version: 6.3.1
  • First release: Nov 14, 2017
  • Latest release: Mar 8, 2018
  • Number of updates: 14
  • Update frequency: every 8.3 days
  • Top authors: miyauchi (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active /43,284 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▼3.35ms] Passed 4 tests

This is a short check of server-side resources used by Logbook
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2945.06 ▲2.93
Dashboard /wp-admin3.66 ▲0.3550.18 ▼3.11
Posts /wp-admin/edit.php3.71 ▲0.3548.43 ▼2.43
Add New Post /wp-admin/post-new.php6.23 ▲0.3490.88 ▼10.79
Media Library /wp-admin/upload.php3.52 ▲0.2840.02 ▲7.26
Settings /wp-admin/edit.php?post_type=logbook&page=settings3.4934.07
Logs /wp-admin/edit.php?post_type=logbook3.6745.30
/wp-admin/admin.php?page=logbook3.5034.56

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 33 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
logbook-scheduled-event

Browser metrics Passed 4 tests

This is an overview of browser requirements for Logbook
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.34 ▼0.031.70 ▼0.3945.41 ▲6.41
Dashboard /wp-admin2,221 ▲415.63 ▼0.0389.70 ▼2.0736.52 ▼6.80
Posts /wp-admin/edit.php2,126 ▲261.99 ▼0.0339.73 ▼2.6638.44 ▲1.87
Add New Post /wp-admin/post-new.php1,548 ▲2223.15 ▼0.12698.70 ▲16.7952.32 ▲0.17
Media Library /wp-admin/upload.php1,420 ▲234.24 ▼0.0098.49 ▼5.2844.49 ▼2.24
Settings /wp-admin/edit.php?post_type=logbook&page=settings8132.0124.0029.30
Logs /wp-admin/edit.php?post_type=logbook1,5991.9835.2133.92
/wp-admin/admin.php?page=logbook6911.126.8413.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'LogBook\\Logger' not found in wp-content/plugins/logbook/src/LogBook/Logger/WP_Login.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'LogBook\\Logger' not found in wp-content/plugins/logbook/src/LogBook/Logger/Last_Error.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI\\CommandWithDBObject' not found in wp-content/plugins/logbook/src/LogBook/CLI.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'LogBook\\Logger' not found in wp-content/plugins/logbook/src/LogBook/Logger/Post_Updated.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'LogBook\\Logger' not found in wp-content/plugins/logbook/src/LogBook/Logger/Updated_Extensions.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'LogBook\\Logger' not found in wp-content/plugins/logbook/src/LogBook/Logger/XML_RPC.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function LogBook\\register_activation_hook() in wp-content/plugins/logbook/logbook.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'LogBook\\Logger' not found in wp-content/plugins/logbook/src/LogBook/Logger/Updated_Core.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Posts_Controller' not found in wp-content/plugins/logbook/src/LogBook/Rest_Logs_Controller.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'LogBook\\Logger' not found in wp-content/plugins/logbook/src/LogBook/Logger/Delete_Post.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: log, security, event

logbook/logbook.php 92% from 13 tests

The primary PHP file in "Logbook" version 1.1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: The domain path folder does not exist ("/languages")

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
There were no executable files found in this plugin2,164 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP283474781,870
CSS1410244
Markdown118049
JSON1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.82
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes22
▷ Abstract classes14.55%
▷ Concrete classes2195.45%
▷ Final classes314.29%
Methods110
▷ Static methods1715.45%
▷ Public methods9485.45%
▷ Protected methods76.36%
▷ Private methods98.18%
Functions15
▷ Named functions640.00%
▷ Anonymous functions960.00%
Constants11
▷ Global constants218.18%
▷ Class constants981.82%
▷ Public constants9100.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