84% cba-easy-embed

Code Review | CBA Easy Embed

WordPress plugin CBA Easy Embed scored84%from 54 tests.

About plugin

  • Plugin page: cba-easy-embed
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1.1
  • WordPress version: 6.3.1
  • First release: Jul 23, 2013
  • Latest release: Feb 23, 2015
  • Number of updates: 4
  • Update frequency: every 147.5 days
  • Top authors: pampfelimetten (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /825 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼13.13ms] Passed 4 tests

Server-side resources used by CBA Easy Embed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0048.29 ▼3.15
Dashboard /wp-admin3.31 ▲0.0055.78 ▲1.37
Posts /wp-admin/edit.php3.36 ▲0.0057.33 ▼45.96
Add New Post /wp-admin/post-new.php5.89 ▲0.00116.16 ▲4.16
Media Library /wp-admin/upload.php3.23 ▲0.0034.90 ▼4.77

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for CBA Easy Embed
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.59 ▼0.785.44 ▲3.5346.92 ▲0.81
Dashboard /wp-admin2,206 ▲184.93 ▲0.07117.82 ▼5.6950.33 ▲5.90
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0142.79 ▼34.9241.88 ▼50.50
Add New Post /wp-admin/post-new.php1,520 ▲123.36 ▼0.07743.88 ▲10.8859.12 ▼5.94
Media Library /wp-admin/upload.php1,385 ▼04.25 ▲0.04116.28 ▲9.0750.60 ▼3.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_oembed_add_provider() in wp-content/plugins/cba-easy-embed/cba-oembed.php:26

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

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
4 plugin tags: embed, cba, oembed, cultural broadcasting archive

cba-easy-embed/cba-oembed.php 92% from 13 tests

This is the main PHP file of "CBA Easy Embed" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cba-easy-embed.php" instead of "cba-oembed.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected3 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17183

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected