78% wp-portability

Code Review | WP-Portability

WordPress plugin WP-Portability scored78%from 54 tests.

About plugin

  • Plugin page: wp-portability
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.0
  • WordPress version: 6.3.1
  • First release: Jul 22, 2014
  • Latest release: Oct 26, 2015
  • Number of updates: 16
  • Update frequency: every 28.8 days
  • Top authors: plankdesign (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,308 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.36ms] Passed 4 tests

An overview of server-side resources used by WP-Portability
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0735.99 ▼3.78
Dashboard /wp-admin3.37 ▲0.0744.92 ▼0.48
Posts /wp-admin/edit.php3.49 ▲0.1347.89 ▼0.35
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.30 ▲3.18
Media Library /wp-admin/upload.php3.30 ▲0.0738.14 ▲6.70

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please fix the following
  • You have illegally modified 1 file (0.50KB) outside of "wp-content/plugins/wp-portability/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP-Portability
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.27 ▼1.024.83 ▲3.2343.19 ▼3.08
Dashboard /wp-admin2,210 ▲244.86 ▼0.08107.11 ▼8.4139.88 ▲1.45
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0739.55 ▼0.8535.68 ▼1.66
Add New Post /wp-admin/post-new.php1,536 ▲2223.07 ▲5.43633.66 ▼66.4348.75 ▼8.51
Media Library /wp-admin/upload.php1,392 ▲74.19 ▲0.0296.84 ▼14.6942.60 ▼0.02
Portability /wp-admin/portability.php260.440.1113.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/wp-portability/wp-portability.php:104
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/wp-portability/views/admin-settings.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/portability.php
    • > Network (severe)
    wp-admin/portability.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: domain-agnostic, installation, url, shortcode, portability...

wp-portability/wp-portability.php Passed 13 tests

The primary PHP file in "WP-Portability" version 1.1.1 is used by WordPress to initiate all plugin functionality
107 characters long description:
A plugin for facilitating deploying a site across different domains and servers without breaking the paths.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin482 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP454191361
JavaScript17270
Markdown129051

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity14.33
▷ Minimum class complexity5.00
▷ Maximum class complexity25.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods13.45%
▷ Public methods2793.10%
▷ Protected methods13.45%
▷ Private methods13.45%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin