73% sumedia-urlify

Code Review | Sumedia Urlify

WordPress plugin Sumedia Urlify scored73%from 54 tests.

About plugin

  • Plugin page: sumedia-urlify
  • Plugin version: 0.3.8
  • PHP compatiblity: 5.6.0 (not tested, could work)+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3 (nothing else tested yet)-5.4
  • WordPress version: 6.3.1
  • First release: Dec 14, 2019
  • Latest release: Dec 9, 2020
  • Number of updates: 28
  • Update frequency: every 13.0 days
  • Top authors: sumediawebdesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /573 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▲65.34ms] Passed 4 tests

This is a short check of server-side resources used by Sumedia Urlify
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1593.65 ▲55.17
Dashboard /wp-admin3.53 ▲0.23121.54 ▲74.18
Posts /wp-admin/edit.php3.58 ▲0.22101.49 ▲51.38
Add New Post /wp-admin/post-new.php6.05 ▲0.17215.53 ▲106.73
Media Library /wp-admin/upload.php3.39 ▲0.17120.18 ▲80.61
Urlify /wp-admin/plugins.php?page=sumedia-urlify3.4286.31

Server storage [IO: ▲0.15MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Just a few items left to fix
  • There were 2 files (5.39KB) illegally modified outside of "wp-content/plugins/sumedia-urlify/" and "wp-content/uploads/"
    • (modified) wp-config.php
    • (modified) .htaccess
Filesystem: 37 new files
Database: 1 new table, 8 new options
New tables
wp_sumedia_urlify_urls
New WordPress options
db_upgraded
sumedia_urlify_version
sumedia_urlify_rewrite_version
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Sumedia Urlify
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.28 ▼0.311.95 ▲0.0444.50 ▲2.30
Dashboard /wp-admin2,190 ▲105.69 ▲0.0285.61 ▼1.3377.34 ▲37.53
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0336.77 ▼2.0930.90 ▼6.79
Add New Post /wp-admin/post-new.php1,532 ▲623.52 ▲0.57759.11 ▲131.7357.70 ▲8.03
Media Library /wp-admin/upload.php1,410 ▲74.17 ▼0.0097.34 ▼0.5161.50 ▲15.85
Urlify /wp-admin/plugins.php?page=sumedia-urlify8172.0024.0035.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_sumedia_urlify_urls
  • Zombie WordPress options detected upon uninstall: 8 options
    • can_compress_scripts
    • widget_recent-comments
    • sumedia_urlify_version
    • widget_theysaidso_widget
    • sumedia_urlify_rewrite_version
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Sumedia\\Urlify\\Base\\View' not found in wp-content/plugins/sumedia-urlify/src/Sumedia/Urlify/Admin/View/Config.php:5
    • > PHP Warning
      require_once(SUMEDIA_URLIFY_PLUGIN_PATH/vendor/wp-cli/wp-config-transformer/src/WPConfigTransformer.php): failed to open stream: No such file or directory in wp-content/plugins/sumedia-urlify/src/Sumedia/Urlify/Config.php on line 6
    • > PHP Warning
      Use of undefined constant SUMEDIA_URLIFY_PLUGIN_PATH - assumed 'SUMEDIA_URLIFY_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/sumedia-urlify/src/Sumedia/Urlify/Config.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Sumedia\\Urlify\\Base\\Repository' not found in wp-content/plugins/sumedia-urlify/src/Sumedia/Urlify/Repository/Urls.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Sumedia\\Urlify\\Base\\View' not found in wp-content/plugins/sumedia-urlify/src/Sumedia/Urlify/Admin/View/Overview.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Sumedia\\Urlify\\Base\\Factory' not found in wp-content/plugins/sumedia-urlify/src/Sumedia/Urlify/HtaccessFactory.php:5
    • > PHP Fatal error
      require_once(): Failed opening required 'SUMEDIA_URLIFY_PLUGIN_PATH/vendor/wp-cli/wp-config-transformer/src/WPConfigTransformer.php' (include_path='.:/usr/share/php') in wp-content/plugins/sumedia-urlify/src/Sumedia/Urlify/Config.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Sumedia\\Urlify\\Base\\View' not found in wp-content/plugins/sumedia-urlify/src/Sumedia/Urlify/Admin/View/Menu.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Sumedia\\Urlify\\Base\\Controller' not found in wp-content/plugins/sumedia-urlify/src/Sumedia/Urlify/Admin/Controller/SetConfig.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Sumedia\\Urlify\\Base\\Form' not found in wp-content/plugins/sumedia-urlify/src/Sumedia/Urlify/Admin/Form/Config.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: rewrite, security, login url, admin url

sumedia-urlify/sumedia-urlify.php 85% from 13 tests

"Sumedia Urlify" version 0.3.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Requires PHP: Required version number formatted incorrectly (ex. "7.0" instead of "5.6.0 (not tested, could work)")
  • Requires at least: Required version number formatted incorrectly (ex. "7.0" instead of "5.3 (nothing else tested yet)")

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
There were no executable files found in this plugin2,187 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP363847091,696
Markdown3860181
CSS1280140
PO File1273786
JSON30084

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.32
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes25
▷ Abstract classes312.00%
▷ Concrete classes2288.00%
▷ Final classes14.55%
Methods151
▷ Static methods95.96%
▷ Public methods13287.42%
▷ Protected methods1811.92%
▷ Private methods10.66%
Functions9
▷ Named functions555.56%
▷ Anonymous functions444.44%
Constants9
▷ Global constants444.44%
▷ Class constants555.56%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/wp-n-suma.png55.99KB19.83KB▼ 64.59%