79% loghero

Code Review | Log-Hero.com Plugin

WordPress plugin Log-Hero.com Plugin scored 79% from 54 tests.

About plugin

  • Plugin page: loghero
  • Plugin version: 0.2.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 14, 2018
  • Latest release: Dec 5, 2018
  • Number of updates: 14
  • Update frequency: every 12.5 days
  • Top authors: loghero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,535 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
Installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼3.93ms] Passed 4 tests

This is a short check of server-side resources used by Log-Hero.com Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2440.21 ▼6.62
Dashboard /wp-admin3.57 ▲0.2748.58 ▼1.67
Posts /wp-admin/edit.php3.62 ▲0.2652.05 ▲2.72
Add New Post /wp-admin/post-new.php6.09 ▲0.2086.40 ▼10.13
Media Library /wp-admin/upload.php3.43 ▲0.2046.79 ▲10.70
LogHero /wp-admin/options-general.php?page=loghero3.4034.71
LogHero Developer Settings /wp-admin/admin.php?page=loghero-dev3.4032.23

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 85 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Log-Hero.com Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲8914.74 ▲0.341.69 ▼0.7440.42 ▼3.47
Dashboard /wp-admin2,227 ▲396.00 ▲1.12108.50 ▲0.8039.15 ▼0.52
Posts /wp-admin/edit.php2,112 ▲232.07 ▲0.0341.47 ▲0.3236.42 ▼0.71
Add New Post /wp-admin/post-new.php1,532 ▼1517.67 ▼0.62637.38 ▲28.4471.10 ▼9.22
Media Library /wp-admin/upload.php1,409 ▲214.23 ▲0.0494.06 ▼3.6241.20 ▼4.18
LogHero /wp-admin/options-general.php?page=loghero8642.0623.2230.75
LogHero Developer Settings /wp-admin/admin.php?page=loghero-dev8022.0624.4424.08

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/loghero/sdk/sample/randomLogs.php
    • > /wp-content/plugins/loghero/tests/bootstrap.php
  • 294× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Predis\\Connection\\FactoryInterface' not found in wp-content/plugins/loghero/sdk/vendor/predis/predis/src/Connection/Factory.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/loghero/sdk/vendor/predis/predis/src/Command/SetCardinality.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/loghero/sdk/vendor/predis/predis/src/Command/StringIncrementByFloat.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Predis\\ClientInterface' not found in wp-content/plugins/loghero/sdk/vendor/predis/predis/src/Client.php:41
    • > PHP Fatal error
      Uncaught Error: Interface 'Predis\\Connection\\ConnectionInterface' not found in wp-content/plugins/loghero/sdk/vendor/predis/predis/src/Connection/NodeConnectionInterface.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/loghero/sdk/vendor/predis/predis/src/Command/StringGetBit.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\ServerEval' not found in wp-content/plugins/loghero/sdk/vendor/predis/predis/src/Command/ServerEvalSHA.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/loghero/sdk/test/MemLogBufferTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/loghero/sdk/vendor/predis/predis/src/Command/HashDelete.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/loghero/sdk/vendor/predis/predis/src/Command/ServerCommand.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
6 plugin tags: seo, logs, log files, search engine bots, crawlers...

loghero/loghero.php Passed 13 tests

This is the main PHP file of "Log-Hero.com Plugin" version 0.2.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
129 characters long description:
Analyze how search engines and other bots crawl and understand your web page. The official PHP Wordpress plugin for log-hero.com.

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
Everything looks great! No dangerous files found in this plugin16,097 lines of code in 383 files:
LanguageFilesBlank linesComment linesLines of code
PHP3673,7499,34414,539
Markdown546301,256
Bourne Shell42111126
JSON400126
XML24226
INI16624

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity3.99
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces27
Interfaces32
Traits0
Classes311
▷ Abstract classes134.18%
▷ Concrete classes29895.82%
▷ Final classes10.34%
Methods1,266
▷ Static methods544.27%
▷ Public methods99078.20%
▷ Protected methods20015.80%
▷ Private methods766.00%
Functions38
▷ Named functions1744.74%
▷ Anonymous functions2155.26%
Constants27
▷ Global constants414.81%
▷ Class constants2385.19%
▷ Public constants23100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin