84% fake-file-generator

Code Review | Fake File Generator Dashboard Widget

WordPress plugin Fake File Generator Dashboard Widget scored84%from 54 tests.

About plugin

  • Plugin page: fake-file-generator
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 20, 2013
  • Latest release: Nov 21, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: farvig (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /696 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Fake File Generator Dashboard Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.68 ▼7.47
Dashboard /wp-admin3.32 ▲0.0147.37 ▼8.79
Posts /wp-admin/edit.php3.37 ▲0.0150.74 ▲0.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.10 ▼7.00
Media Library /wp-admin/upload.php3.24 ▲0.0133.40 ▼1.30

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Fake File Generator Dashboard Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲12314.26 ▲0.001.63 ▼0.1444.26 ▼0.22
Dashboard /wp-admin2,290 ▲1135.64 ▼0.0089.10 ▼10.0039.36 ▼3.46
Posts /wp-admin/edit.php2,100 ▼31.99 ▲0.0038.98 ▲3.7134.96 ▲2.71
Add New Post /wp-admin/post-new.php1,526 ▼023.06 ▼0.38656.60 ▼4.6756.00 ▲3.18
Media Library /wp-admin/upload.php1,400 ▲34.14 ▼0.0395.88 ▼0.3844.65 ▼0.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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/fake-file-generator/fake-file-generator-dashboard-widget.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were 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:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === fake-file-generator === )
Please take inspiration from this readme.txt

fake-file-generator/fake-file-generator-dashboard-widget.php 92% from 13 tests

The primary PHP file in "Fake File Generator Dashboard Widget" version 0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("fake-file-generator.php" instead of "fake-file-generator-dashboard-widget.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
Good job! No executable or dangerous file extensions detected58 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1162458

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions5
▷ Named functions5100.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
No PNG files were detected