58% lh-nominate-this

Code Review | LH Nominate This

WordPress plugin LH Nominate This scored 58% from 54 tests.

About plugin

  • Plugin page: lh-nominate-this
  • Plugin version: 2.00
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 5.8.1
  • First release: May 11, 2018
  • Latest release: Oct 13, 2020
  • Number of updates: 5
  • Update frequency: every 177.4 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 466 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼138.34ms] Passed 4 tests

This is a short check of server-side resources used by LH Nominate This
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.0842.11 ▲7.46
Dashboard /wp-admin3.14 ▲0.0953.17 ▲3.66
Posts /wp-admin/edit.php3.25 ▲0.1550.35 ▲4.38
Add New Post /wp-admin/post-new.php5.50 ▲0.0789.48 ▼559.86
Media Library /wp-admin/upload.php3.08 ▲0.0836.67 ▼1.54

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for LH Nominate This
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.27 ▲0.718.82 ▼0.1350.41 ▼4.22
Dashboard /wp-admin2,967 ▲336.05 ▲0.06139.59 ▼13.96118.24 ▼4.17
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0171.33 ▲1.9588.05 ▼10.49
Add New Post /wp-admin/post-new.php1,724 ▲22417.08 ▼1.51370.07 ▼14.60121.32 ▲3.96
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.03161.97 ▼3.79134.06 ▲11.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Error in wp-content/plugins/lh-nominate-this/lh-nominate-this.php+660
    Uncaught Error: Call to undefined method LH_Nominate_this_plugin::return_opt_name() in wp-content/plugins/lh-nominate-this/lh-nominate-this.php:660
    Stack trace:
    #0 wp-includes/class-wp-hook.php(303): LH_Nominate_this_plugin::uninstall()
    #1 wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(470): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(1272): do_action()
    #4 wp-admin/includes/plugin.php(965): uninstall_plugin()
  • Incomplete uninstall procedure, leaving 18 files (0.20MB) in the plugin directory
    • (new file) includes/readability/examples/JSLikeHTMLElement.php
    • (new file) includes/readability/README.md
    • (new file) includes/lh-mercury-web-parser-api-class.php
    • (new file) includes/readability/readability.php
    • (new file) includes/lh-copy-from-url-class.php
    • (new file) includes/OpenGraph.php
    • (new file) includes/readability/composer.json
    • (new file) includes/readability/examples/Readability.php
    • (new file) includes/readability/JSLikeHTMLElement.php
    • (new file) includes/lh-readability-parser-class.php
    • ...
  • Zombie WordPress options were found after uninstall: 1 option
    • recovery_mode_email_last_sent

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/lh-nominate-this/includes/readability/examples/JSLikeHTMLElement.php
    • > /wp-content/plugins/lh-nominate-this/includes/urlresolver/tools/resolve_url.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/lh-nominate-this/includes/urlresolver/tools/resolve_url.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lh-nominate-this/lh-nominate-this.php:668
    • > PHP Notice
      Undefined variable: argv in wp-content/plugins/lh-nominate-this/includes/urlresolver/tools/resolve_url.php on line 11
    • > PHP Warning
      require_once(../Readability.php): failed to open stream: No such file or directory in wp-content/plugins/lh-nominate-this/includes/readability/examples/Readability.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required '../Readability.php' (include_path='.:/usr/share/php') in wp-content/plugins/lh-nominate-this/includes/readability/examples/Readability.php on line 2
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/lh-nominate-this/partials/tools.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: press-this, readability, bookmarklet, nominate, curation

lh-nominate-this/lh-nominate-this.php 85% from 13 tests

The principal PHP file in "LH Nominate This" v. 2.00 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Domain Path: The domain path folder was not found ("/languages")

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
No dangerous file extensions were detected3,779 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP141,2451,5773,562
Markdown2580184
JSON10033

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity74.91
▷ Minimum class complexity3.00
▷ Maximum class complexity230.00
Average method complexity4.86
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods210
▷ Static methods3014.29%
▷ Public methods17382.38%
▷ Protected methods2110.00%
▷ Private methods167.62%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants25
▷ Global constants2288.00%
▷ Class constants312.00%
▷ Public constants3100.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 images were found in this plugin