62% simple-posts-generator

Code Review | Simple Posts Generator

WordPress plugin Simple Posts Generator scored62%from 54 tests.

About plugin

  • Plugin page: simple-posts-gene...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.3
  • WordPress version: 6.3.1
  • First release: May 8, 2015
  • Latest release: Jul 29, 2015
  • Number of updates: 13
  • Update frequency: every 6.3 days
  • Top authors: raeven (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,122 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼1.97MB] [CPU: ▼58.30ms] Passed 4 tests

This is a short check of server-side resources used by Simple Posts Generator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.75 ▼36.57
Dashboard /wp-admin2.05 ▼1.306.07 ▼55.45
Posts /wp-admin/edit.php2.05 ▼1.315.51 ▼45.32
Add New Post /wp-admin/post-new.php2.05 ▼3.845.13 ▼95.87
Media Library /wp-admin/upload.php2.05 ▼1.185.20 ▼30.78
Simple Post Generator /wp-admin/tools.php?page=simple-post-generator2.055.01

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

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

Browser metrics Passed 4 tests

Simple Posts Generator: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.34 ▲0.381.68 ▼0.0539.86 ▼3.61
Dashboard /wp-admin2,202 ▲255.68 ▲0.1292.26 ▲1.7942.57 ▲0.04
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0341.01 ▼0.0836.22 ▼0.86
Add New Post /wp-admin/post-new.php1,529 ▼223.01 ▼0.21610.47 ▼22.8952.61 ▼10.74
Media Library /wp-admin/upload.php1,404 ▲74.30 ▲0.10100.45 ▼1.5543.82 ▼5.76
Simple Post Generator /wp-admin/tools.php?page=simple-post-generator1,6876.44130.58107.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=simple-post-generator
    • > User notice in wp-includes/functions.php+5905
    Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.)

SRP 0% 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 output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/simple-posts-generator/views/help.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-posts-generator/simple-posts-generator.php on line 14
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-posts-generator/views/main_container.php:18
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-posts-generator/views/generate_posts.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_users() in wp-content/plugins/simple-posts-generator/simple-posts-generator.php:46
    • > PHP Warning
      include(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/simple-posts-generator/simple-posts-generator.php on line 14
    • > PHP Warning
      include(): Failed opening 'ABSPATHwp-includes/pluggable.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/simple-posts-generator/simple-posts-generator.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === simple-posts-generator === )
You can look at the official readme.txt

simple-posts-generator/simple-posts-generator.php Passed 13 tests

This is the main PHP file of "Simple Posts Generator" version 1.3.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
59 characters long description:
A simple User and Post generator for testers and developers

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
Good job! No executable or dangerous file extensions detected231 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43712231

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin