78% mimo-logo-changer

Code Review | Wordpress logo changer

WordPress plugin Wordpress logo changer scored78%from 54 tests.

About plugin

  • Plugin page: mimo-logo-changer
  • Plugin version: 1.4.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: May 24, 2019
  • Latest release: Dec 21, 2021
  • Number of updates: 15
  • Update frequency: every 62.8 days
  • Top authors: mortezagh1376 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,250 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.09ms] Passed 4 tests

Server-side resources used by Wordpress logo changer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0235.42 ▼8.45
Dashboard /wp-admin3.34 ▲0.0349.30 ▼3.24
Posts /wp-admin/edit.php3.39 ▲0.0348.72 ▲0.77
Add New Post /wp-admin/post-new.php5.94 ▲0.0595.10 ▼1.44
Media Library /wp-admin/upload.php3.26 ▲0.0337.65 ▲2.98
Wordpress Logo Changer /wp-admin/admin.php?page=mlchanger_setting3.2940.76

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Wordpress logo changer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲10213.18 ▼1.471.70 ▼0.3442.17 ▼9.59
Dashboard /wp-admin2,229 ▲415.09 ▼0.79101.84 ▲2.1838.86 ▼5.26
Posts /wp-admin/edit.php2,112 ▲202.03 ▼0.0238.98 ▼2.0835.89 ▼2.01
Add New Post /wp-admin/post-new.php1,546 ▲1318.45 ▼4.75605.19 ▲18.9960.70 ▲8.44
Media Library /wp-admin/upload.php1,408 ▲204.19 ▼0.0193.58 ▼4.0241.44 ▼7.32
Wordpress Logo Changer /wp-admin/admin.php?page=mlchanger_setting1,2083.1941.6562.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/mimo-logo-changer/logo-changer.php
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant MLCHANGER_CORE_DIR - assumed 'MLCHANGER_CORE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/mimo-logo-changer/core/autoload.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mimo-logo-changer/admin/page.php:3
    • > PHP Warning
      include(MLCHANGER_CORE_DIRimg_changer.php): failed to open stream: No such file or directory in wp-content/plugins/mimo-logo-changer/core/autoload.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mimo-logo-changer/core/autoload.php:8
    • > PHP Warning
      include(): Failed opening 'MLCHANGER_CORE_DIRtitle_changer.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/mimo-logo-changer/core/autoload.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mimo-logo-changer/core/img_changer.php:3
    • > PHP Warning
      include(): Failed opening 'MLCHANGER_CORE_DIRmessage_changer.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/mimo-logo-changer/core/autoload.php on line 6
    • > PHP Warning
      Use of undefined constant MLCHANGER_CORE_DIR - assumed 'MLCHANGER_CORE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/mimo-logo-changer/core/autoload.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mimo-logo-changer/templates/main-page-html.php:2
    • > PHP Warning
      include(): Failed opening 'MLCHANGER_CORE_DIRurl_changer.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/mimo-logo-changer/core/autoload.php on line 4

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (mimo logo changer configuration part 1), #2 (mimo logo changer configuration part 2 - use default message style), #3 (Wordpress Login Page with default message style), #4 (mimo logo changer configuration use custom HTML), #5 (Wordpress Login Page with custom HTML)
You can take inspiration from this readme.txt

mimo-logo-changer/logo-changer.php 92% from 13 tests

The principal PHP file in "Wordpress logo changer" v. 1.4.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("mimo-logo-changer.php" instead of "logo-changer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected501 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP117729311
PO File25051143
CSS113928
JavaScript12019

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
5 PNG files occupy 0.21MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png34.18KB13.93KB▼ 59.23%
screenshot-3.png33.19KB13.42KB▼ 59.56%
screenshot-2.png29.90KB8.40KB▼ 71.92%
screenshot-1.png90.95KB26.20KB▼ 71.19%
screenshot-4.png26.47KB8.26KB▼ 68.80%