84% pitchhub-embed

Code Review | PitchHub Embed

WordPress plugin PitchHub Embed scored84%from 54 tests.

About plugin

  • Plugin page: pitchhub-embed
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: May 23, 2019
  • Latest release: May 28, 2019
  • Number of updates: 3
  • Update frequency: every 2.0 days
  • Top authors: pitchhubitstuff (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /470 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.68ms] Passed 4 tests

Analyzing server-side resources used by PitchHub Embed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0142.25 ▼8.03
Dashboard /wp-admin3.36 ▲0.0150.94 ▼2.12
Posts /wp-admin/edit.php3.41 ▲0.0156.89 ▼2.94
Add New Post /wp-admin/post-new.php5.94 ▲0.0186.10 ▼25.64
Media Library /wp-admin/upload.php3.28 ▲0.0136.43 ▼0.80

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

PitchHub Embed: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.72 ▲0.481.68 ▼0.0441.43 ▼6.16
Dashboard /wp-admin2,195 ▲245.68 ▲0.1087.76 ▼9.0140.14 ▼3.64
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0041.82 ▲5.0638.00 ▲1.00
Add New Post /wp-admin/post-new.php1,526 ▼523.11 ▲0.08690.96 ▲10.9052.41 ▼1.23
Media Library /wp-admin/upload.php1,397 ▼64.19 ▼0.03101.07 ▲3.5244.03 ▲0.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pitchhub-embed/pitchhub-embed.php:37

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: insert, pitchhub, embed, video

pitchhub-embed/pitchhub-embed.php Passed 13 tests

"PitchHub Embed" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
69 characters long description:
Quickly add PitchHub video menus into your Wordpress pages and posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin68 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2315968

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods266.67%
▷ Protected methods133.33%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin