78% external-posts

Code Review | External Posts

WordPress plugin External Posts scored 78% from 54 tests.

About plugin

  • Plugin page: external-posts
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.7.5
  • WordPress version: 6.3.1
  • First release: Jun 5, 2017
  • Latest release: Jun 14, 2017
  • Number of updates: 5
  • Update frequency: every 2.4 days
  • Top authors: jadelaop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,002 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
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.58ms] Passed 4 tests

An overview of server-side resources used by External Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.70 ▼0.63
Dashboard /wp-admin3.35 ▲0.0549.13 ▼0.49
Posts /wp-admin/edit.php3.47 ▲0.1149.55 ▲0.87
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.70 ▼14.07
Media Library /wp-admin/upload.php3.28 ▲0.0536.97 ▲2.58

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

External Posts: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.18 ▼1.231.67 ▲0.0544.52 ▲5.89
Dashboard /wp-admin2,216 ▲255.88 ▼0.00101.23 ▼3.6542.03 ▲3.73
Posts /wp-admin/edit.php2,096 ▲102.03 ▼0.0036.88 ▲3.0030.11 ▼4.61
Add New Post /wp-admin/post-new.php6,628 ▲5,08629.15 ▲10.84983.08 ▲362.6873.22 ▲6.47
Media Library /wp-admin/upload.php1,392 ▲74.22 ▲0.06104.89 ▼0.1840.96 ▼1.34

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/external-posts/admin/partials/external-posts-admin-display.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/external-posts/admin/class-external-posts-admin.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/image.php): failed to open stream: No such file or directory in wp-content/plugins/external-posts/admin/class-external-posts-admin.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/image.php' (include_path='.:/usr/share/php') in wp-content/plugins/external-posts/admin/class-external-posts-admin.php on line 3

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 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
2 plugin tags: external content, links

external-posts/external_posts.php 92% from 13 tests

The primary PHP file in "External Posts" version 1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("external-posts.php" instead of "external_posts.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
Everything looks great! No dangerous files found in this plugin306 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP1116038267
PO File15524
JavaScript14015

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.15
Average class complexity2.14
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.35
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin