84% remote-content-shortcode

Code Review | Remote Content Shortcode

WordPress plugin Remote Content Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: remote-content-sh...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.2.1
  • WordPress version: 6.3.1
  • First release: May 19, 2014
  • Latest release: Jun 14, 2019
  • Number of updates: 28
  • Update frequency: every 66.3 days
  • Top authors: doublesharp (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /9,534 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Remote Content Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.65 ▲1.98
Dashboard /wp-admin3.33 ▼0.0245.74 ▼13.49
Posts /wp-admin/edit.php3.38 ▲0.0246.86 ▼2.09
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.10 ▼18.45
Media Library /wp-admin/upload.php3.25 ▲0.0236.14 ▼2.23

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Remote Content Shortcode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.201.76 ▲0.0643.07 ▲4.32
Dashboard /wp-admin2,206 ▲145.05 ▲0.08109.99 ▼8.2241.54 ▼0.88
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0038.75 ▼0.7534.49 ▼3.95
Add New Post /wp-admin/post-new.php1,514 ▼1917.58 ▼5.75604.43 ▼83.5944.33 ▼13.27
Media Library /wp-admin/upload.php1,388 ▼34.15 ▼0.0996.43 ▼11.5140.23 ▼7.22

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/remote-content-shortcode/remote-content-shortcode.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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 to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Shortcode example to fetch source from a WordPress Plugin Subversion Repository.), #2 (Displaying the contents of a PHP file from the WordPress Plugin Subversion Repository using SyntaxHighlighter.)
Please take inspiration from this readme.txt

remote-content-shortcode/remote-content-shortcode.php Passed 13 tests

The primary PHP file in "Remote Content Shortcode" version 1.5 is used by WordPress to initiate all plugin functionality
37 characters long description:
Embed remote content with a shortcode

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
Good job! No executable or dangerous file extensions detected3,797 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2522,0793,797

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity69.36
▷ Minimum class complexity1.00
▷ Maximum class complexity555.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes13
▷ Abstract classes215.38%
▷ Concrete classes1184.62%
▷ Final classes00.00%
Methods269
▷ Static methods7427.51%
▷ Public methods22282.53%
▷ Protected methods4315.99%
▷ Private methods41.49%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin