84% simison-wikimedia-commons-potd-wp-login

Code Review | Wikimedia Commons Picture of The Day for WP Login

WordPress plugin Wikimedia Commons Picture of The Day for WP Login scored84%from 54 tests.

About plugin

  • Plugin page: simison-wikimedia...
  • Plugin version: 1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.8.3
  • WordPress version: 6.3.1
  • First release: Nov 10, 2017
  • Latest release: Nov 10, 2017
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: simison (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /869 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.90ms] Passed 4 tests

This is a short check of server-side resources used by Wikimedia Commons Picture of The Day for WP Login
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.95 ▲5.00
Dashboard /wp-admin3.31 ▲0.0042.81 ▼4.31
Posts /wp-admin/edit.php3.36 ▲0.0045.85 ▼0.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.87 ▼3.90
Media Library /wp-admin/upload.php3.23 ▲0.0034.16 ▲0.78

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wikimedia Commons Picture of The Day for WP Login
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.20 ▼0.151.69 ▲0.0844.71 ▲2.41
Dashboard /wp-admin2,195 ▲145.54 ▼0.1780.38 ▼16.6035.65 ▼5.89
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0833.20 ▼6.7334.32 ▼4.38
Add New Post /wp-admin/post-new.php1,526 ▼023.17 ▲0.36653.10 ▼15.6657.77 ▼8.52
Media Library /wp-admin/upload.php1,400 ▲34.17 ▼0.0597.97 ▼9.4642.97 ▼4.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/simison-wikimedia-commons-potd-wp-login/wikimedia-commons-potd-login.php

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 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: The official readme.txt is a good inspiration

simison-wikimedia-commons-potd-wp-login/wikimedia-commons-potd-login.php 92% from 13 tests

"Wikimedia Commons Picture of The Day for WP Login" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simison-wikimedia-commons-potd-wp-login.php" instead of "wikimedia-commons-potd-login.php")

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 plugin94 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3265881
CSS10013

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods240.00%
▷ Protected methods00.00%
▷ Private methods360.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin