84% i-am-real-donald-trump-widget

Code Review | I Am Real Donald Trump Widget

WordPress plugin I Am Real Donald Trump Widget scored84%from 54 tests.

About plugin

  • Plugin page: i-am-real-donald-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.3
  • WordPress version: 6.3.1
  • First release: Nov 2, 2015
  • Latest release: Nov 2, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: jennschiffer (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,202 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.94ms] Passed 4 tests

An overview of server-side resources used by I Am Real Donald Trump Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.17 ▼3.76
Dashboard /wp-admin3.33 ▼0.0251.09 ▼9.91
Posts /wp-admin/edit.php3.38 ▲0.0249.13 ▼0.04
Add New Post /wp-admin/post-new.php5.91 ▲0.02100.30 ▼6.06
Media Library /wp-admin/upload.php3.26 ▲0.0234.40 ▲3.32

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_i-am-real-donald-trump-widget
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for I Am Real Donald Trump Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.58 ▼0.721.98 ▲0.2542.25 ▼1.08
Dashboard /wp-admin2,209 ▲214.87 ▼1.0198.99 ▼10.2738.51 ▼6.60
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0439.44 ▲0.1235.08 ▼1.51
Add New Post /wp-admin/post-new.php1,542 ▲2818.49 ▲0.87614.34 ▼40.6656.30 ▲4.69
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.1994.32 ▼18.0540.13 ▼3.06

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_i-am-real-donald-trump-widget
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/i-am-real-donald-trump-widget/i-am-real-donald-trump-widget.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === i-am-real-donald-trump-widget === )
  • Screenshots: These screenshots do not have images: #1 (The I Am Real Donald Trump Widget form.), #2 (The I Am Real Donald Trump Widget as shown on an example blog, talking about lairs.)
You can look at the official readme.txt

i-am-real-donald-trump-widget/i-am-real-donald-trump-widget.php Passed 13 tests

This is the main PHP file of "I Am Real Donald Trump Widget" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
44 characters long description:
A widget that allows you to be Donald Trump.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin268 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP380153268

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity17.00
▷ Minimum class complexity4.00
▷ Maximum class complexity30.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1285.71%
▷ Protected methods00.00%
▷ Private methods214.29%
Functions2
▷ Named functions2100.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
2 PNG files occupy 0.12MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png47.48KB12.90KB▼ 72.82%
screenshot-2.png80.17KB23.33KB▼ 70.90%