94% anyembed

Code Review | anyEmbed

WordPress plugin anyEmbed scored 94% from 54 tests.

About plugin

  • Plugin page: anyembed
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.5.2
  • WordPress version: 5.8.1
  • First release: Jun 26, 2013
  • Latest release: Jun 26, 2013
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: anyLiv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 744 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by anyEmbed
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1236.06 ▲15.00
Dashboard /wp-admin3.06 ▲0.0142.78 ▼5.68
Posts /wp-admin/edit.php3.12 ▲0.0137.57 ▼7.76
Add New Post /wp-admin/post-new.php5.42 ▼0.0186.35 ▼583.48
Media Library /wp-admin/upload.php3.01 ▲0.0133.96 ▲0.25

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for anyEmbed
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.84 ▼0.139.41 ▼3.7144.76 ▼5.18
Dashboard /wp-admin2,967 ▲335.92 ▲0.01139.23 ▼2.88107.13 ▼4.85
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.1464.27 ▲1.8297.07 ▼0.82
Add New Post /wp-admin/post-new.php1,876 ▲26119.13 ▼2.29367.13 ▲96.86112.20 ▲6.44
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.02145.00 ▼7.05119.98 ▲7.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_embed_register_handler() in wp-content/plugins/anyembed/anyEmbed.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === anyembed === )
The official readme.txt might help

anyembed/anyEmbed.php 92% from 13 tests

The entry point to "anyEmbed" version 0.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("anyembed.php" instead of "anyEmbed.php")

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
Success! There were no dangerous files found in this plugin16 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191116

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin