10% automatic-posting

Code Review | Automatic Posting

WordPress plugin Automatic Posting scored10%from 54 tests.

About plugin

  • Plugin page: automatic-posting
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Feb 5, 2013
  • Latest release: Feb 5, 2013
  • Number of updates: 3
  • Update frequency: every 2.3 days
  • Top authors: fred.denny8967 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,031 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/automatic-posting/automatic-posting.php+133
    Non-static method automatic_posting::init() should not be called statically

Server metrics [RAM: ▼1.92MB] [CPU: ▼57.60ms] Passed 4 tests

An overview of server-side resources used by Automatic Posting
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.99 ▼36.84
Dashboard /wp-admin2.08 ▼1.226.45 ▼52.52
Posts /wp-admin/edit.php2.08 ▼1.276.07 ▼44.65
Add New Post /wp-admin/post-new.php2.08 ▼3.806.44 ▼96.38
Media Library /wp-admin/upload.php2.08 ▼1.156.07 ▼33.18

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Automatic Posting
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.36 ▲0.011.78 ▼0.0144.34 ▲0.37
Dashboard /wp-admin2,196 ▲195.55 ▼0.1384.28 ▼17.7543.16 ▼3.74
Posts /wp-admin/edit.php2,104 ▲41.98 ▲0.0235.33 ▼1.6835.42 ▼1.57
Add New Post /wp-admin/post-new.php1,531 ▲523.11 ▲0.01669.53 ▼6.7865.86 ▲0.37
Media Library /wp-admin/upload.php1,407 ▲74.15 ▼0.13100.53 ▲4.6244.45 ▲2.36
Automatic Posting /wp-admin/automatic_posting.php260.420.0913.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/automatic-posting/automatic-posting.php+133
    Non-static method automatic_posting::init() should not be called statically
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/automatic-posting/templates/page-settings.php
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: post_title in wp-content/plugins/automatic-posting/templates/page-settings.php on line 14
    • > PHP Notice
      Undefined variable: post_tagline in wp-content/plugins/automatic-posting/templates/page-settings.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/automatic-posting/automatic-posting.php:20
    • > PHP Notice
      Undefined variable: post_link in wp-content/plugins/automatic-posting/templates/page-settings.php on line 65
    • > PHP Notice
      Undefined variable: post_content in wp-content/plugins/automatic-posting/templates/page-settings.php on line 44
    • > PHP Notice
      Undefined variable: post_tags in wp-content/plugins/automatic-posting/templates/page-settings.php on line 55
    • > PHP Notice
      Undefined variable: post_url in wp-content/plugins/automatic-posting/templates/page-settings.php on line 75
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/automatic-posting/templates/page-settings.php on line 114
    • > PHP Notice
      Undefined variable: post_categories in wp-content/plugins/automatic-posting/templates/page-settings.php on line 132
    • > PHP Notice
      Undefined variable: post_description in wp-content/plugins/automatic-posting/templates/page-settings.php on line 33

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/automatic_posting.php
    • > Network (severe)
    wp-admin/automatic_posting.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (In Screenshot you can see how you can run automatic posting.) image missing
You can take inspiration from this readme.txt

automatic-posting/automatic-posting.php Passed 13 tests

The entry point to "Automatic Posting" version 1.0 is a PHP file that has certain tags in its header comment area
66 characters long description:
This plugins adds settings for automatic posting in all categories

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
Success! There were no dangerous files found in this plugin186 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP27624186

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.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%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
Screenshot-1.png114.56KB40.61KB▼ 64.55%