73% auto-random-content

Code Review | AutoRadomContent

WordPress plugin AutoRadomContent scored 73% from 54 tests.

About plugin

  • Plugin page: auto-random-content
  • Plugin version: 2.1.2
  • PHP compatiblity: 7.0.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.9.6
  • WordPress version: 6.3.1
  • First release: Jan 18, 2018
  • Latest release: Jun 19, 2018
  • Number of updates: 38
  • Update frequency: every 4.0 days
  • Top authors: marcobaro1991 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,131 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▲0.45ms] Passed 4 tests

This is a short check of server-side resources used by AutoRadomContent
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.04 ▼3.09
Dashboard /wp-admin3.54 ▲0.243,816.27 ▲3,765.95
Posts /wp-admin/edit.php3.59 ▲0.2452.42 ▲2.51
Add New Post /wp-admin/post-new.php6.08 ▲0.1998.22 ▼0.28
Media Library /wp-admin/upload.php3.40 ▲0.1740.09 ▲2.68

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 604 new files
Database: 1 new table, 6 new options
New tables
wp_random_content
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

AutoRadomContent: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲14813.40 ▼0.961.64 ▼0.2246.50 ▲3.42
Dashboard /wp-admin2,310 ▲1365.93 ▲0.00111.11 ▼6.1888.10 ▲44.40
Posts /wp-admin/edit.php2,169 ▲832.07 ▲0.0640.24 ▲0.3637.46 ▲5.48
Add New Post /wp-admin/post-new.php1,592 ▲5923.20 ▼0.10767.51 ▲108.9572.18 ▼2.11
Media Library /wp-admin/upload.php1,465 ▲774.23 ▲0.05126.51 ▲24.4652.25 ▲4.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_random_content
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 509× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Address' not found in wp-content/plugins/auto-random-content/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Address.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Company' not found in wp-content/plugins/auto-random-content/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/Company.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Internet' not found in wp-content/plugins/auto-random-content/vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/Internet.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Person' not found in wp-content/plugins/auto-random-content/vendor/fzaninotto/faker/src/Faker/Provider/tr_TR/Person.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\it_IT\\Text' not found in wp-content/plugins/auto-random-content/vendor/fzaninotto/faker/src/Faker/Provider/it_CH/Text.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Company' not found in wp-content/plugins/auto-random-content/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/Company.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Address' not found in wp-content/plugins/auto-random-content/vendor/fzaninotto/faker/src/Faker/Provider/es_ES/Address.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Company' not found in wp-content/plugins/auto-random-content/vendor/fzaninotto/faker/src/Faker/Provider/de_AT/Company.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Person' not found in wp-content/plugins/auto-random-content/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Person.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/auto-random-content/vendor/fzaninotto/faker/test/Faker/Provider/CompanyTest.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 21 tag instead of maximum 10
  • Screenshots: Add descriptions for screenshots #0, #0, #0 in auto-random-content/assets to your readme.txt
The official readme.txt is a good inspiration

auto-random-content/auto-random-content.php 92% from 13 tests

The main file in "AutoRadomContent" v. 2.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin100,921 lines of code in 586 files:
LanguageFilesBlank linesComment linesLines of code
PHP56812,9989,76884,050
JSON50014,661
Markdown339301,736
JavaScript32751167
Sass1170155
PO File2460114
YAML16018
XML11011
make1208
CSS1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity2.71
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces126
Interfaces0
Traits0
Classes564
▷ Abstract classes10.18%
▷ Concrete classes56399.82%
▷ Final classes00.00%
Methods1,702
▷ Static methods65038.19%
▷ Public methods1,60894.48%
▷ Protected methods482.82%
▷ Private methods462.70%
Functions111
▷ Named functions21.80%
▷ Anonymous functions10998.20%
Constants46
▷ Global constants00.00%
▷ Class constants46100.00%
▷ Public constants46100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.99MB with 0.62MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot2.png247.50KB97.15KB▼ 60.75%
assets/banner-1544x500.png180.87KB78.72KB▼ 56.47%
assets/screenshot1.png256.38KB100.66KB▼ 60.74%
assets/icon-256x256.png0.73KB0.17KB▼ 76.77%
assets/screenshot3.png250.32KB97.35KB▼ 61.11%