83% wxy-tools-media-replace

Code Review | WXY Tools Media Replace

WordPress plugin WXY Tools Media Replace scored83%from 54 tests.

About plugin

  • Plugin page: wxy-tools-media-r...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6.2
  • WordPress version: 6.3.1
  • First release: Feb 26, 2021
  • Latest release: Mar 2, 2021
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: exoboy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /401 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.05MB] [CPU: ▼2.46ms] Passed 4 tests

An overview of server-side resources used by WXY Tools Media Replace
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0443.95 ▲3.33
Dashboard /wp-admin3.36 ▲0.0645.65 ▼1.80
Posts /wp-admin/edit.php3.41 ▲0.0550.23 ▲2.84
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.93 ▼11.96
Media Library /wp-admin/upload.php3.28 ▲0.0535.35 ▲1.10
WXY Tools Media Replace /wp-admin/options-general.php?page=wxy_tools_media_replace_settings_page3.2636.63

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

WXY Tools Media Replace: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲3914.47 ▲0.221.69 ▼0.4543.44 ▲0.11
Dashboard /wp-admin2,216 ▲284.85 ▼1.02113.04 ▼2.8939.90 ▼9.14
Posts /wp-admin/edit.php2,102 ▲132.06 ▲0.0540.52 ▲4.1236.27 ▲0.85
Add New Post /wp-admin/post-new.php6,208 ▲4,68024.23 ▲6.06912.69 ▲264.6969.97 ▲7.11
Media Library /wp-admin/upload.php1,424 ▲364.28 ▲0.07101.51 ▼5.1449.08 ▲4.45
WXY Tools Media Replace /wp-admin/options-general.php?page=wxy_tools_media_replace_settings_page1,0825.79168.1157.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 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)
Even though no errors were found, this is by no means 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 items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wxy-tools-media-replace/wxy-tools-media-replace.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wxy-tools-media-replace/options/wxy-tools-media-replace-options.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === wxy-tools-media-replace === )
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (WXY Tools Media Replace - Post Edit Meta Box), #2 (WXY Tools Media Replace - Page Edit Meta Box), #3 (WXY Tools Media Replace - Media Library Status Bar), #4 (WXY Tools Media Replace - Settings Area)
  • Donate link: Invalid URI found ("")
Please take inspiration from this readme.txt

wxy-tools-media-replace/wxy-tools-media-replace.php Passed 13 tests

The entry point to "WXY Tools Media Replace" version 1.0.0 is a PHP file that has certain tags in its header comment area
129 characters long description:
Upload files to the media tab and if there is a file already uploaded with that filename, the new file will replacde the old one.

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 detected496 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2159157419
JavaScript1272777

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions14
▷ Named functions14100.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
There were not PNG files found in your plugin