79% oexchange

Code Review | OExchange

WordPress plugin OExchange scored79%from 54 tests.

About plugin

  • Plugin page: oexchange
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.9.2
  • WordPress version: 6.3.1
  • First release: May 12, 2010
  • Latest release: Jan 28, 2018
  • Number of updates: 28
  • Update frequency: every 100.6 days
  • Top authors: pfefferle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,157 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Analyzing server-side resources used by OExchange
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.08 ▲1.74
Dashboard /wp-admin3.32 ▼0.0352.26 ▼11.81
Posts /wp-admin/edit.php3.37 ▲0.0144.56 ▼5.37
Add New Post /wp-admin/post-new.php5.90 ▲0.01101.11 ▲6.97
Media Library /wp-admin/upload.php3.24 ▲0.0131.25 ▼6.94
OExchange /wp-admin/options-general.php?page=oexchange3.2530.79

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for OExchange
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.38 ▲0.001.95 ▲0.3743.00 ▲2.83
Dashboard /wp-admin2,202 ▲225.64 ▼0.0196.04 ▲10.0044.33 ▲1.92
Posts /wp-admin/edit.php2,104 ▲42.13 ▲0.1237.94 ▼1.8432.83 ▼5.75
Add New Post /wp-admin/post-new.php1,558 ▲3218.29 ▲0.67642.95 ▲36.3073.36 ▲20.84
Media Library /wp-admin/upload.php1,407 ▲44.23 ▼0.02102.05 ▼4.7943.29 ▼0.01
OExchange /wp-admin/options-general.php?page=oexchange8532.0422.9031.35

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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=oexchange
    • > User deprecated in wp-includes/functions.php+5453
    Function wp_specialchars is deprecated since version 2.8.0! Use esc_html() instead.

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
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oexchange/oexchange.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/oexchange/oexchange-xrd.php:2

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: bookmarklet, oexchange, like, exchange, share...

oexchange/oexchange.php Passed 13 tests

This is the main PHP file of "OExchange" version 2.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
61 characters long description:
Adds OExchange support to WordPress' "Press This" bookmarklet

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
Good job! No executable or dangerous file extensions detected139 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23968139

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods12100.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin