10% am-login-logo

Code Review | WP Logo Changer

WordPress plugin WP Logo Changer scored 10% from 53 tests.

About plugin

  • Plugin page: am-login-logo
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 5.8.1
  • First release: Dec 24, 2016
  • Latest release: Jan 26, 2017
  • Number of updates: 16
  • Update frequency: every 4.0 days
  • Top authors: afzalmultani (100%)

Code review

53 tests

User reviews

4 reviews

Install metrics

700+ active / 7,867 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/am-login-logo/index.php+240
    Function create_function() is deprecated

Server metrics [RAM: ▼1.71MB] [CPU: ▼315.43ms] Passed 4 tests

Analyzing server-side resources used by WP Logo Changer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.92 ▼0.805.49 ▼15.22
Dashboard /wp-admin1.93 ▼1.125.86 ▼36.81
Posts /wp-admin/edit.php1.94 ▼1.177.08 ▼39.05
Add New Post /wp-admin/post-new.php1.93 ▼3.496.71 ▼1,155.31
Media Library /wp-admin/upload.php1.94 ▼1.075.94 ▼30.53

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WP Logo Changer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,699 ▲11716.25 ▲0.408.69 ▲1.3844.46 ▼6.76
Dashboard /wp-admin2,980 ▲1306.54 ▲0.70140.58 ▲4.21110.21 ▲7.23
Posts /wp-admin/edit.php2,759 ▲532.98 ▲0.3067.72 ▲1.92105.93 ▲14.59
Add New Post /wp-admin/post-new.php1,685 ▲3218.84 ▲0.04351.16 ▼30.07108.09 ▼1.29
Media Library /wp-admin/upload.php1,825 ▲505.41 ▲0.39133.05 ▼33.53108.89 ▼5.50

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
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/am-login-logo/index.php+240
    Function create_function() is deprecated

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/am-login-logo/index.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Please delete some tags, you are using 22 tag instead of maximum 10
The official readme.txt might help

am-login-logo/index.php 92% from 13 tests

The principal PHP file in "WP Logo Changer" v. 1.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("am-login-logo.php" instead of "index.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
Success! There were no dangerous files found in this plugin615 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2101112594
CSS12118
JavaScript1003

PHP code Passed 2 tests

A brief analysis 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.31
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/hs.png2.62KB7.54KB0.00%
images/hv.png2.80KB7.32KB0.00%