78% auto-content-poster

Code Review | Plugin Name: Auto Content Poster for Commission Junction

WordPress plugin Plugin Name: Auto Content Poster for Commission Junction scored78%from 54 tests.

About plugin

  • Plugin page: auto-content-poster
  • Plugin version: 1.9.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7.3
  • WordPress version: 6.3.1
  • First release: Apr 8, 2014
  • Latest release: Mar 31, 2017
  • Number of updates: 43
  • Update frequency: every 25.3 days
  • Top authors: DR_BVT123 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /5,750 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.86ms] Passed 4 tests

An overview of server-side resources used by Plugin Name: Auto Content Poster for Commission Junction
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0245.56 ▼1.14
Dashboard /wp-admin3.33 ▲0.0253.66 ▲0.15
Posts /wp-admin/edit.php3.38 ▲0.0250.76 ▼1.99
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.37 ▲2.71
Media Library /wp-admin/upload.php3.25 ▲0.0238.61 ▼0.47
All Links /wp-admin/link-manager.php3.2336.87
Link Categories /wp-admin/edit-tags.php?taxonomy=link_category3.3346.95
Auto Poster CJ Settings /wp-admin/options-general.php?page=acp_cjoptions3.3034.11
Add New /wp-admin/link-add.php3.2336.36

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 8 new options
New WordPress options
acp_cj_settings
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_links
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Plugin Name: Auto Content Poster for Commission Junction
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲11814.28 ▼0.062.07 ▲0.2539.72 ▼12.54
Dashboard /wp-admin2,242 ▲715.52 ▼0.0889.24 ▼12.5548.70 ▲4.91
Posts /wp-admin/edit.php2,147 ▲471.98 ▼0.0436.43 ▲2.2142.37 ▲4.66
Add New Post /wp-admin/post-new.php1,413 ▼11820.61 ▼2.48571.13 ▼107.5738.87 ▼33.15
Media Library /wp-admin/upload.php1,444 ▲504.09 ▼0.11106.53 ▲7.6647.24 ▲1.10
All Links /wp-admin/link-manager.php1,1022.0426.9939.25
Link Categories /wp-admin/edit-tags.php?taxonomy=link_category1,3212.1227.5045.69
Auto Poster CJ Settings /wp-admin/options-general.php?page=acp_cjoptions1,1081.9925.8140.24
Add New /wp-admin/link-add.php1,6692.5747.1444.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_links
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=acp_cjoptions
    • > Notice in wp-content/plugins/auto-content-poster/includes/options-page.php+40
    Undefined index: rselect
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=acp_cjoptions
    • > Notice in wp-content/plugins/auto-content-poster/includes/options-page.php+67
    Undefined index: eb_select

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
Almost there! Just fix the following items
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id=' at line 1 for query SELECT adid,adname,adcat FROM WHERE id= made by acp_cjposter
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acp_cj_cj_alltodb() in wp-content/plugins/auto-content-poster/acp.php:232
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/auto-content-poster/includes/options-page.php:7
    • > WordPress database error Table 'potrivit.bestcjdb' doesn't exist for query SELECT count(id) FROM bestcjdb made by require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/auto-content-poster/acp.php'), acp_cj_checkdb
    • > WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id=1' at line 1 for query SELECT tmp FROM WHERE id=1 made by acp_cjposter
    • > WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 for query SELECT MAX(id) FROM made by acp_cjposter
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-content-poster/acp.php:394
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/auto-content-poster/includes/options2.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Screenshots: Screenshot #1 (Plugin control panel) image not found
  • Plugin Name: Please specify the plugin name on the first line ( === Plugin Name: Auto Content Poster for Commission Junction === )
You can look at the official readme.txt

auto-content-poster/acp.php 92% from 13 tests

The entry point to "Plugin Name: Auto Content Poster for Commission Junction" version 1.9.4 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("auto-content-poster.php" instead of "acp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected836 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP510495771
JavaScript111065

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.00
▷ Minimum class complexity2.00
▷ Maximum class complexity12.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin