78% remote-post-swap

Code Review | Remote Post Swap

WordPress plugin Remote Post Swap scored78%from 54 tests.

About plugin

  • Plugin page: remote-post-swap
  • Plugin version: 0.8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-4.7.3
  • WordPress version: 6.3.1
  • First release: Apr 14, 2017
  • Latest release: Apr 18, 2017
  • Number of updates: 12
  • Update frequency: every 0.3 days
  • Top authors: TyB (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /621 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.75ms] Passed 4 tests

Server-side resources used by Remote Post Swap
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.82 ▲2.82
Dashboard /wp-admin3.41 ▲0.0645.95 ▼13.29
Posts /wp-admin/edit.php3.52 ▲0.1646.79 ▲0.41
Add New Post /wp-admin/post-new.php5.99 ▲0.1090.40 ▼3.22
Media Library /wp-admin/upload.php3.33 ▲0.1035.43 ▲1.12
RPS Settings /wp-admin/options-general.php?page=rps-settings-admin3.3131.34

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Remote Post Swap
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲5814.42 ▲0.071.77 ▲0.1837.65 ▼0.77
Dashboard /wp-admin2,202 ▲245.61 ▲0.0383.57 ▼17.3936.38 ▼0.40
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0434.77 ▼3.4836.96 ▼2.32
Add New Post /wp-admin/post-new.php1,529 ▼623.13 ▲4.89612.16 ▼13.9275.04 ▼21.45
Media Library /wp-admin/upload.php1,398 ▼54.23 ▲0.0597.68 ▼1.9044.72 ▲0.21
RPS Settings /wp-admin/options-general.php?page=rps-settings-admin8662.0425.5630.43

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 | 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
  • 11× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/remote-post-swap/inc/admin/class-rps-admin.php
    • > /wp-content/plugins/remote-post-swap/remote-post-swap.php
    • > /wp-content/plugins/remote-post-swap/inc/admin/class-rps-settings-display.php
    • > /wp-content/plugins/remote-post-swap/inc/class-rps-retrieve-data.php
    • > /wp-content/plugins/remote-post-swap/inc/class-rps-base.php
    • > /wp-content/plugins/remote-post-swap/inc/class-rps-activator.php
    • > /wp-content/plugins/remote-post-swap/inc/class-rps-deactivator.php
    • > /wp-content/plugins/remote-post-swap/inc/class-rps.php
    • > /wp-content/plugins/remote-post-swap/inc/admin/class-rps-settings.php
    • > /wp-content/plugins/remote-post-swap/inc/class-rps-post-media.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/remote-post-swap/inc/admin/partials/settings-page.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: api, posts, post swap, wp-api, swap...

remote-post-swap/remote-post-swap.php 92% from 13 tests

This is the main PHP file of "Remote Post Swap" version 0.8.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:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin593 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP15222549579
JSON10014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity7.55
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods47
▷ Static methods2348.94%
▷ Public methods3472.34%
▷ Protected methods24.26%
▷ Private methods1123.40%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants6
▷ Global constants6100.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 were not PNG files found in your plugin