78% ajax-posts-content

Code Review | Ajax Posts Content

WordPress plugin Ajax Posts Content scored78%from 54 tests.

About plugin

  • Plugin page: ajax-posts-content
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.5
  • WordPress version: 6.3.1
  • First release: Dec 2, 2018
  • Latest release: Dec 2, 2018
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: stelsrf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /638 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼8.39ms] Passed 4 tests

A check of server-side resources used by Ajax Posts Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0533.36 ▼7.93
Dashboard /wp-admin3.37 ▲0.0645.85 ▼2.33
Posts /wp-admin/edit.php3.42 ▲0.0643.37 ▼2.79
Add New Post /wp-admin/post-new.php5.95 ▲0.0679.51 ▼20.49
Media Library /wp-admin/upload.php3.29 ▲0.0635.06 ▲3.48
Ajax PostsContent /wp-admin/options-general.php?page=apc-settings3.2329.17

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
apc_option
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Ajax Posts Content: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.29 ▼0.941.55 ▼0.0742.58 ▼0.82
Dashboard /wp-admin2,213 ▲284.85 ▼0.0297.66 ▼7.5339.43 ▼6.23
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0334.67 ▼6.8333.99 ▼0.41
Add New Post /wp-admin/post-new.php1,536 ▲323.15 ▲0.22658.10 ▲57.9558.75 ▲0.40
Media Library /wp-admin/upload.php1,392 ▲14.21 ▲0.0195.25 ▼9.9042.34 ▼2.28
Ajax PostsContent /wp-admin/options-general.php?page=apc-settings9692.1521.7628.11

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • apc_option
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=apc-settings
    • > Notice in wp-content/plugins/ajax-posts-content/ajax-posts-content.php+84
    Undefined index: apc_template_post
    • > GET request to /wp-admin/options-general.php?page=apc-settings
    • > Notice in wp-content/plugins/ajax-posts-content/ajax-posts-content.php+84
    Undefined index: apc_template_page
    • > GET request to /wp-admin/options-general.php?page=apc-settings
    • > Notice in wp-content/plugins/ajax-posts-content/ajax-posts-content.php+84
    Undefined index: apc_template_attachment

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ajax-posts-content/ajax-posts-content.php:141
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_title() in wp-content/plugins/ajax-posts-content/template/def.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/ajax-posts-content/style.php:5

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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes: You can look at the official readme.txt

ajax-posts-content/ajax-posts-content.php Passed 13 tests

"Ajax Posts Content" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
62 characters long description:
Plugin for creating infinite feed posts on a single post page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin208 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32633208

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin