78% ajax-content-filter

Code Review | Ajax Content Filter

WordPress plugin Ajax Content Filter scored78%from 54 tests.

About plugin

  • Plugin page: ajax-content-filter
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 24, 2013
  • Latest release: Feb 8, 2023
  • Number of updates: 24
  • Update frequency: every 141.4 days
  • Top authors: uvesh123 (95.83%)perceptionsystemlabs (8.33%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /4,249 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.79ms] Passed 4 tests

Server-side resources used by Ajax Content Filter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.24 ▲1.35
Dashboard /wp-admin3.34 ▲0.0448.70 ▼4.68
Posts /wp-admin/edit.php3.39 ▲0.0449.78 ▼3.50
Add New Post /wp-admin/post-new.php5.92 ▲0.0491.05 ▼4.31
Media Library /wp-admin/upload.php3.26 ▲0.0340.83 ▲2.43
Add New ACF Post /wp-admin/post-new.php?post_type=acf_post3.3850.63
ACF Posts /wp-admin/edit.php?post_type=acf_post3.3147.74

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 123 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Ajax Content Filter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲14313.57 ▼0.807.98 ▲5.9344.06 ▼2.43
Dashboard /wp-admin2,234 ▲494.89 ▼0.09101.46 ▼9.3678.82 ▲37.34
Posts /wp-admin/edit.php2,120 ▲312.01 ▼0.0436.46 ▼2.2737.38 ▼2.33
Add New Post /wp-admin/post-new.php1,693 ▲17922.54 ▲4.98702.39 ▲31.4752.89 ▲0.27
Media Library /wp-admin/upload.php1,410 ▲194.16 ▼0.07104.25 ▲1.5745.65 ▼1.14
Add New ACF Post /wp-admin/post-new.php?post_type=acf_post2,1557.61176.03129.09
ACF Posts /wp-admin/edit.php?post_type=acf_post1,0961.9339.7646.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ajax-content-filter/views/lesson-todo.php
  • 92× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/ajax-content-filter/lib/lib/TransferReversal.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ajax-content-filter/views/certificates.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/ajax-content-filter/lib/lib/ApplicationFeeRefund.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ajax-content-filter/views/shortcode-generator.html.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ExternalAccount' not found in wp-content/plugins/ajax-content-filter/lib/lib/BitcoinReceiver.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ajax-content-filter/views/lesson-meta-box.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/ajax-content-filter/lib/lib/SingletonApiResource.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ajax-content-filter/views/my_courses.php:1
    • > PHP Notice
      Undefined variable: todo in wp-content/plugins/ajax-content-filter/views/lesson-todo.php on line 22
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/ajax-content-filter/lib/lib/FileUpload.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: ajax filter, filerable post content, content filter, display content using ajax, change content

ajax-content-filter/acf.php 92% from 13 tests

The principal PHP file in "Ajax Content Filter" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ajax-content-filter.php" instead of "acf.php")

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 plugin9,278 lines of code in 118 files:
LanguageFilesBlank linesComment linesLines of code
PHP1162,0362,4759,264
JavaScript1009
CSS1005

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity17.56
▷ Minimum class complexity1.00
▷ Maximum class complexity235.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces4
Interfaces3
Traits0
Classes76
▷ Abstract classes56.58%
▷ Concrete classes7193.42%
▷ Final classes00.00%
Methods437
▷ Static methods27963.84%
▷ Public methods41695.19%
▷ Protected methods92.06%
▷ Private methods122.75%
Functions24
▷ Named functions2395.83%
▷ Anonymous functions14.17%
Constants30
▷ Global constants2273.33%
▷ Class constants826.67%
▷ Public constants8100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/perceptionlogo.png1.30KB1.34KB0.00%
js/acf.png0.27KB0.21KB▼ 20.07%