84% word-replacer-ultra

Code Review | Word Replacer Pro

WordPress plugin Word Replacer Pro scored84%from 54 tests.

About plugin

  • Plugin page: word-replacer-ultra
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 6.3.1
  • First release: Jan 29, 2021
  • Latest release: Jan 29, 2021
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: charlestsmith (100%)

Code review

54 tests

User reviews

1 review

Install metrics

4,000+ active /6,714 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.35ms] Passed 4 tests

This is a short check of server-side resources used by Word Replacer Pro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0247.40 ▲5.28
Dashboard /wp-admin3.33 ▲0.0354.69 ▲3.66
Posts /wp-admin/edit.php3.38 ▲0.0251.47 ▲0.44
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.18 ▼13.45
Media Library /wp-admin/upload.php3.25 ▲0.0239.53 ▲3.95

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Word Replacer Pro: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6613.67 ▼0.402.11 ▼0.0640.32 ▼3.53
Dashboard /wp-admin2,233 ▲335.80 ▼0.11109.19 ▼6.4544.62 ▲5.25
Posts /wp-admin/edit.php2,112 ▲122.00 ▼0.0437.84 ▼0.2236.18 ▲1.49
Add New Post /wp-admin/post-new.php1,560 ▲1523.05 ▼0.18597.79 ▼96.9551.68 ▼5.96
Media Library /wp-admin/upload.php1,412 ▲124.27 ▲0.01102.05 ▼8.5441.69 ▼4.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% 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 everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/word-replacer-ultra/word-replacer-ultra.php:16

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 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

word-replacer-ultra/word-replacer-ultra.php Passed 13 tests

The main PHP script in "Word Replacer Pro" version 1.0 is automatically included on every request by WordPress
59 characters long description:
Search and Replace in Post, Pages and all Custom Post Type.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin201 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP41222156
JavaScript23344
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.50
▷ Minimum class complexity5.00
▷ Maximum class complexity6.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin