74% word-replacer

Code Review | Word Replacer

WordPress plugin Word Replacer scored 74% from 54 tests.

About plugin

  • Plugin page: word-replacer
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.9.2
  • WordPress version: 6.3.1
  • First release: Feb 4, 2010
  • Latest release: Aug 10, 2014
  • Number of updates: 37
  • Update frequency: every 44.6 days
  • Top authors: takien (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active / 39,778 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.16MB] [CPU: ▼13.86ms] Passed 4 tests

This is a short check of server-side resources used by Word Replacer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.16 ▲2.65
Dashboard /wp-admin3.21 ▼0.1032.64 ▼16.50
Posts /wp-admin/edit.php3.27 ▼0.0940.50 ▼3.86
Add New Post /wp-admin/post-new.php5.45 ▼0.4375.48 ▼30.10
Media Library /wp-admin/upload.php3.21 ▼0.0230.79 ▼4.98
Word Replacer /wp-admin/options-general.php?page=wordreplacer3.1828.35

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: 1 new table, 7 new options
New tables
wp_word_replacer
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
word_replacer_ver
widget_recent-comments

Browser metrics Passed 4 tests

Word Replacer: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.23 ▼1.151.70 ▲0.0943.36 ▼1.71
Dashboard /wp-admin2,210 ▲225.84 ▼0.04104.23 ▲1.4237.68 ▼6.77
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0435.21 ▼3.0732.82 ▼2.48
Add New Post /wp-admin/post-new.php1,536 ▲323.20 ▲0.11599.54 ▼4.4052.12 ▲7.28
Media Library /wp-admin/upload.php1,395 ▲44.19 ▼0.1096.00 ▼5.9048.61 ▲3.54
Word Replacer /wp-admin/options-general.php?page=wordreplacer1,0122.1127.6427.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie tables detected upon uninstall: 1 table
    • wp_word_replacer
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • word_replacer_ver
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wordreplacer
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: censor, comment, filter, replacer, page...

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

The entry point to "Word Replacer" version 0.4 is a PHP file that has certain tags in its header comment area
57 characters long description:
Replace word in post, page, title or comment and bbPress.

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 plugin439 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26924439

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity74.00
▷ Minimum class complexity74.00
▷ Maximum class complexity74.00
Average method complexity5.29
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods15.88%
▷ Public methods1482.35%
▷ Protected methods00.00%
▷ Private methods317.65%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin