94% wp-logs-book

Code Review | WP Logs Book

WordPress plugin WP Logs Book scored 94% from 54 tests.

About plugin

  • Plugin page: wp-logs-book
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.5.0
  • WordPress version: 5.8.1
  • First release: Dec 29, 2012
  • Latest release: Jan 8, 2013
  • Number of updates: 25
  • Update frequency: every 2.8 days
  • Top authors: onetarek (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active / 1,955 total downloads

Benchmarks

Plugin footprint Passed 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.01MB] [CPU: ▼140.96ms] Passed 4 tests

Analyzing server-side resources used by WP Logs Book
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1239.13 ▲18.39
Dashboard /wp-admin3.07 ▲0.0145.29 ▼2.27
Posts /wp-admin/edit.php3.12 ▲0.0145.15 ▼0.94
Add New Post /wp-admin/post-new.php5.43 ▼0.0191.28 ▼558.92
Media Library /wp-admin/upload.php3.01 ▲0.0131.87 ▼1.70
Login Attack Log /wp-admin/admin.php?page=wp-logs-book/login_attack_log2.9823.00
Options /wp-admin/admin.php?page=wp-logs-book2.9827.34
Error 404 Log /wp-admin/admin.php?page=wp-logs-book/404_log2.9822.85

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP Logs Book
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,742 ▲13616.04 ▲0.3813.84 ▲3.9749.92 ▲1.33
Dashboard /wp-admin3,012 ▲815.91 ▼0.07134.30 ▼14.7797.14 ▼20.74
Posts /wp-admin/edit.php2,778 ▲392.73 ▲0.0263.75 ▼4.1184.45 ▼4.99
Add New Post /wp-admin/post-new.php1,697 ▲2718.85 ▼0.31382.65 ▼1.56113.23 ▲3.52
Media Library /wp-admin/upload.php1,861 ▲545.05 ▲0.03145.31 ▲1.91119.72 ▲0.07
Login Attack Log /wp-admin/admin.php?page=wp-logs-book/login_attack_log1,1312.1055.0363.80
Options /wp-admin/admin.php?page=wp-logs-book1,1042.0955.1375.27
Error 404 Log /wp-admin/admin.php?page=wp-logs-book/404_log1,1242.0956.4869.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-logs-book/includes/404-log.php on line 102
    • > PHP Notice
      Undefined variable: wplb_services in wp-content/plugins/wp-logs-book/includes/404-log.php on line 102
    • > PHP Notice
      Undefined variable: wplb_services in wp-content/plugins/wp-logs-book/includes/login-attack-log.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-logs-book/wp-logs-book.php:33
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-logs-book/includes/login-attack-log.php on line 2

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: tracking, hacking attempt, error 404, developer, aanalytics...

wp-logs-book/wp-logs-book.php 92% from 13 tests

The main PHP file in "WP Logs Book" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 361 characters long)

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
Good job! No executable or dangerous file extensions detected231 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43829231

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected