78% external-related-posts

Code Review | External Related Posts

WordPress plugin External Related Posts scored78%from 54 tests.

About plugin

  • Plugin page: external-related-...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.2
  • WordPress version: 6.3.1
  • First release: Aug 6, 2010
  • Latest release: Mar 14, 2012
  • Number of updates: 11
  • Update frequency: every 53.3 days
  • Top authors: mintindeed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /5,979 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.74ms] Passed 4 tests

A check of server-side resources used by External Related Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.78 ▲0.92
Dashboard /wp-admin3.33 ▲0.0245.05 ▼3.24
Posts /wp-admin/edit.php3.38 ▲0.0246.94 ▼2.52
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.28 ▼2.25
Media Library /wp-admin/upload.php3.25 ▲0.0232.53 ▼6.93
External Related Posts /wp-admin/options-general.php?page=external-related-posts3.1927.05

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by External Related Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.25 ▼1.111.65 ▼0.0641.96 ▼4.60
Dashboard /wp-admin2,213 ▲224.86 ▼0.07109.03 ▼6.6440.57 ▼4.93
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0740.03 ▲0.4735.82 ▲2.53
Add New Post /wp-admin/post-new.php1,546 ▲1318.28 ▼5.01611.70 ▼67.8460.69 ▲4.70
Media Library /wp-admin/upload.php1,395 ▲104.18 ▲0.04100.37 ▼0.2150.02 ▲6.33
External Related Posts /wp-admin/options-general.php?page=external-related-posts9382.0523.3032.44

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=external-related-posts
    • > Notice in wp-content/plugins/external-related-posts/class-external-related-posts-options.php+199
    Undefined variable: sitemap_filename

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 add_action() in wp-content/plugins/external-related-posts/external-related-posts.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (External Related Posts options page.), #2 (How External Related Posts might look on your blog.)
You can look at the official readme.txt

external-related-posts/external-related-posts.php Passed 13 tests

This is the main PHP file of "External Related Posts" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
109 characters long description:
Grabs related links from Google Blog Search, inserts a link to them into your post and gives them a pingback.

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
There were no executable files found in this plugin286 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP397269286

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity15.50
▷ Minimum class complexity14.00
▷ Maximum class complexity17.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods418.18%
▷ Public methods22100.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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin