78% wp-post-enricher

Code Review | WP Post Enricher

WordPress plugin WP Post Enricher scored78%from 54 tests.

About plugin

  • Plugin page: wp-post-enricher
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Apr 6, 2016
  • Latest release: Apr 2, 2016
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: lfbn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /508 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.03MB] [CPU: ▼8.63ms] Passed 4 tests

A check of server-side resources used by WP Post Enricher
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.17 ▼2.74
Dashboard /wp-admin3.34 ▲0.0348.22 ▼1.66
Posts /wp-admin/edit.php3.38 ▲0.0349.39 ▲1.87
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.14 ▼28.36
Media Library /wp-admin/upload.php3.26 ▲0.0335.29 ▼1.76

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

WP Post Enricher: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲12913.65 ▼0.731.65 ▲0.1726.91 ▼14.46
Dashboard /wp-admin2,212 ▲245.85 ▲0.97101.16 ▼7.4943.37 ▼0.08
Posts /wp-admin/edit.php2,095 ▲62.06 ▲0.0637.06 ▲0.2543.88 ▲7.41
Add New Post /wp-admin/post-new.php6,271 ▲4,75226.16 ▲3.12863.31 ▲207.7856.37 ▲0.28
Media Library /wp-admin/upload.php1,397 ▲64.23 ▲0.0297.32 ▼4.1042.07 ▼2.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% 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 0% 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
Please fix the following
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-post-enricher/views/response-table-twitter.php
    • > /wp-content/plugins/wp-post-enricher/views/response-table-youtube.php
    • > /wp-content/plugins/wp-post-enricher/views/response-table-google-search.php
    • > /wp-content/plugins/wp-post-enricher/views/post-edit-meta-box.php
    • > /wp-content/plugins/wp-post-enricher/views/response-table-word-metrics.php
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/wp-post-enricher/views/response-table-twitter.php on line 8
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-post-enricher/views/response-table-google-search.php on line 8
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-post-enricher/views/response-table-word-metrics.php on line 11
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/wp-post-enricher/views/response-table-word-metrics.php on line 11
    • > PHP Notice
      Undefined variable: loadingImgUrl in wp-content/plugins/wp-post-enricher/views/post-edit-meta-box.php on line 34
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/wp-post-enricher/views/response-table-youtube.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'PostEnricher\\Controller\\BaseController' not found in wp-content/plugins/wp-post-enricher/src/PostEnricher/Controller/SearchController.php:8
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/wp-post-enricher/views/response-table-google-search.php on line 8
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-post-enricher/views/response-table-twitter.php on line 8
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-post-enricher/views/response-table-youtube.php on line 9

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 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot shows what the meta box, in the new post page, look like.), #2 (You can search for youtube videos.), #3 (And also for Word Metrics, like CPC, competition, number of results and search volume.)
Please take inspiration from this readme.txt

wp-post-enricher/wp-post-enricher.php Passed 13 tests

The main PHP script in "WP Post Enricher" version 1.0 is automatically included on every request by WordPress
104 characters long description:
Official WP Post Enricher plugin for WordPress. Improve your post creation. Requires PHP 5.4 or greater.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin647 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP18130251575
JavaScript17034
CSS10020
Markdown115018

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods29
▷ Static methods1551.72%
▷ Public methods2689.66%
▷ Protected methods00.00%
▷ Private methods310.34%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.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