84% wp-swift-edit

Code Review | WP Swift Edit

WordPress plugin WP Swift Edit scored84%from 54 tests.

About plugin

  • Plugin page: wp-swift-edit
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: Dec 21, 2017
  • Latest release: May 9, 2022
  • Number of updates: 15
  • Update frequency: every 106.7 days
  • Top authors: scottlee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /755 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.56ms] Passed 4 tests

This is a short check of server-side resources used by WP Swift Edit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.13 ▼1.50
Dashboard /wp-admin3.31 ▼0.0346.68 ▼16.75
Posts /wp-admin/edit.php3.37 ▲0.0147.98 ▲2.05
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.62 ▼14.05
Media Library /wp-admin/upload.php3.24 ▲0.0136.54 ▲3.47

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Swift Edit
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.131.66 ▼0.1840.21 ▼3.26
Dashboard /wp-admin2,195 ▲185.62 ▼0.0189.60 ▼4.8641.92 ▼4.26
Posts /wp-admin/edit.php2,100 ▼32.04 ▲0.0338.08 ▼3.4037.13 ▲0.02
Add New Post /wp-admin/post-new.php1,526 ▼1023.08 ▲4.82584.28 ▼76.3759.20 ▼2.71
Media Library /wp-admin/upload.php1,403 ▲34.12 ▼0.0595.90 ▼1.7742.95 ▲1.13

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-swift-edit/wp-swift-edit.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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
3 plugin tags: edit, developer, editor

wp-swift-edit/wp-swift-edit.php 92% from 13 tests

The entry point to "WP Swift Edit" version 1.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 144 characters long)

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

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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