83% replace-default-words

Code Review | Replace Default Words

WordPress plugin Replace Default Words scored 83% from 54 tests.

About plugin

  • Plugin page: replace-default-w...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 5.8.1
  • First release: Sep 12, 2015
  • Latest release: Oct 21, 2016
  • Number of updates: 14
  • Update frequency: every 28.9 days
  • Top authors: mandegarweb (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active / 12,351 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼1.03MB] [CPU: ▼174.95ms] Passed 4 tests

Analyzing server-side resources used by Replace Default Words
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.57 ▼0.2625.49 ▼4.28
Dashboard /wp-admin2.62 ▼0.4321.87 ▼28.01
Posts /wp-admin/edit.php2.62 ▼0.4921.91 ▼27.12
Add New Post /wp-admin/post-new.php2.62 ▼2.8120.77 ▼634.35
Media Library /wp-admin/upload.php2.62 ▼0.3820.30 ▼10.32
RDW /wp-admin/tools.php?page=replace-default-words2.6218.85

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: 1 new table, no new options
New tables
wp_replace_mandegarweb

Browser metrics Passed 4 tests

This is an overview of browser requirements for Replace Default Words
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,715 ▲13315.93 ▲0.439.87 ▲2.9349.39 ▼3.00
Dashboard /wp-admin2,982 ▲515.93 ▼0.05142.12 ▲0.76109.54 ▼9.09
Posts /wp-admin/edit.php2,751 ▲122.70 ▲0.0172.59 ▼4.1193.15 ▲2.22
Add New Post /wp-admin/post-new.php1,893 ▲21015.88 ▼2.96376.81 ▲8.95105.87 ▼9.16
Media Library /wp-admin/upload.php1,819 ▼35.01 ▲0.00148.27 ▲0.18123.88 ▼3.75
RDW /wp-admin/tools.php?page=replace-default-words1,0922.0951.4557.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method mandegarweb_default_words::mandegarweb_localization_init() should not be called statically

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=replace-default-words
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method mandegarweb_default_words::mandegarweb_localization_init() should not be called statically
    • > GET request to /wp-admin/tools.php?page=replace-default-words
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method mandegarweb_default_words::mandegarweb_replace_function() should not be called statically
    • > GET request to /wp-admin/tools.php?page=replace-default-words
    • > User notice in wp-includes/functions.php+5663
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/tools.php?page=replace-default-words
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method mandegarweb_default_words::mandegarweb_replace_word_css() should not be called statically
    • > GET request to /wp-admin/tools.php?page=replace-default-words
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method mandegarweb_update::mandegarweb_update_load_script() should not be called statically
    • > GET request to /wp-admin/tools.php?page=replace-default-words
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method mandegarweb_default_words::mandegarweb_replace_word_default() should not be called statically

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Plugin page), #2 (Replace default words)
  • Tags: There are too many tags (21 tag instead of maximum 10)
The official readme.txt is a good inspiration

replace-default-words/replace-default-words.php 92% from 13 tests

The main PHP file in "Replace Default Words" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected520 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP43019261
PO File38181210
CSS111348
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity10.50
▷ Minimum class complexity5.00
▷ Maximum class complexity16.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png9.96KB9.10KB▼ 8.67%
screenshot-1.png6.31KB5.50KB▼ 12.88%