90% lucas-string-replace

Code Review | Lucas String Replace

WordPress plugin Lucas String Replace scored 90% from 54 tests.

About plugin

  • Plugin page: lucas-string-replace
  • Plugin version: 2.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Mar 4, 2016
  • Latest release: Nov 21, 2017
  • Number of updates: 21
  • Update frequency: every 36.6 days
  • Top authors: lucasstad (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

2,000+ active / 5,466 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▲3.64ms] Passed 4 tests

An overview of server-side resources used by Lucas String Replace
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1340.19 ▼1.27
Dashboard /wp-admin3.42 ▲0.1153.54 ▲2.58
Posts /wp-admin/edit.php3.53 ▲0.1775.19 ▲24.79
Add New Post /wp-admin/post-new.php6.00 ▲0.11106.33 ▲11.61
Media Library /wp-admin/upload.php3.34 ▲0.1137.38 ▲1.63
Lucas String Replace /wp-admin/options-general.php?page=lucas_strrep_settings3.3137.22

Server storage [IO: ▲0.04MB] [DB: ▲0.33MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
lucas_strrep_version
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lucas String Replace
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1513.31 ▼1.141.87 ▲0.1144.61 ▲0.24
Dashboard /wp-admin2,210 ▲15.74 ▲0.90103.14 ▲4.2641.65 ▼0.53
Posts /wp-admin/edit.php2,093 ▲41.97 ▼0.0539.86 ▼0.0735.69 ▲0.26
Add New Post /wp-admin/post-new.php1,536 ▲323.10 ▲0.02772.89 ▲83.4154.49 ▼6.36
Media Library /wp-admin/upload.php1,392 ▲44.25 ▲0.0594.19 ▼5.6241.73 ▼0.34
Lucas String Replace /wp-admin/options-general.php?page=lucas_strrep_settings8162.0525.6527.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • lucas_strrep_version
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

lucas-string-replace/lucas-string-replace.php Passed 13 tests

The main PHP script in "Lucas String Replace" version 2.0.5 is automatically included on every request by WordPress
126 characters long description:
Change anything: Lucas String Replace takes the final output of WordPress and replaces the defined strings with another string

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin667 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP722861589
PO File1212278

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity37.33
▷ Minimum class complexity7.00
▷ Maximum class complexity90.00
Average method complexity5.36
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods312.00%
▷ Public methods2496.00%
▷ Protected methods00.00%
▷ Private methods14.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

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