88% replace-word

Code Review | Replace Word

WordPress plugin Replace Word scored 88% from 54 tests.

About plugin

  • Plugin page: replace-word
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-5.7
  • WordPress version: 5.9.2
  • First release: Sep 22, 2015
  • Latest release: Mar 25, 2021
  • Number of updates: 37
  • Update frequency: every 54.4 days
  • Top authors: pokornydavid (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active / 6,322 total downloads

Benchmarks

Plugin footprint Passed 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.02MB] [CPU: ▼312.24ms] Passed 4 tests

This is a short check of server-side resources used by Replace Word
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0553.87 ▼5.68
Dashboard /wp-admin3.41 ▲0.0137.41 ▼49.19
Posts /wp-admin/edit.php3.65 ▲0.0136.01 ▼27.98
Add New Post /wp-admin/post-new.php6.88 ▼0.0893.85 ▼1,166.09
Media Library /wp-admin/upload.php3.30 ▲0.0026.53 ▼4.88
Replace Word /wp-admin/options-general.php?page=replace-word3.3222.74

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Replace Word
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,801 ▲5715.86 ▼0.085.82 ▼0.482.37 ▲0.13
Dashboard /wp-admin2,893 ▲326.24 ▲0.13121.62 ▼16.57164.36 ▼0.73
Posts /wp-admin/edit.php2,690 ▲53.24 ▲0.0163.32 ▼2.94145.19 ▼2.10
Add New Post /wp-admin/post-new.php1,755 ▲9420.92 ▲4.40433.96 ▲18.78181.71 ▼12.76
Media Library /wp-admin/upload.php1,700 ▲85.49 ▼0.10151.76 ▲0.61236.17 ▲9.89
Replace Word /wp-admin/options-general.php?page=replace-word1,1262.8197.34104.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=replace-word
    • > Notice in wp-content/plugins/replace-word/template/rword-admin-html.php+27
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=replace-word
    • > Notice in wp-content/plugins/replace-word/template/rword-admin-html.php+85
    Undefined variable: i

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 take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/replace-word/rword-admin-settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/replace-word/template/rword-admin-html.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/replace-word/rword-front-action.php:72

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% 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:
  • Tags: There are too many tags (15 tag instead of maximum 10)
  • Screenshots: Screenshot #1 (Screenshot 'screenshot-1.png' shows option page for this plug-in.) image required
You can look at the official readme.txt

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

"Replace Word" version 2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
80 characters long description:
This plugin is use to replace word from site whithout touch it's code structure.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected491 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS2308233
PHP41131210
JavaScript10648

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.43
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
Namespaces0
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png39.42KB18.78KB▼ 52.36%
assets/images/draggable.png4.88KB4.64KB▼ 4.91%