79% aps-content-moderator

Code Review | APS Content Moderator Plugin

WordPress plugin APS Content Moderator Plugin scored79%from 54 tests.

About plugin

  • Plugin page: aps-content-moder...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Oct 7, 2019
  • Latest release: Jan 4, 2022
  • Number of updates: 13
  • Update frequency: every 63.1 days
  • Top authors: devniko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /716 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.12MB] [CPU: ▼11.55ms] Passed 4 tests

Analyzing server-side resources used by APS Content Moderator Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1541.41 ▼1.70
Dashboard /wp-admin3.43 ▲0.0851.97 ▼23.07
Posts /wp-admin/edit.php3.54 ▲0.1852.04 ▲0.75
Add New Post /wp-admin/post-new.php6.03 ▲0.1489.71 ▼22.19
Media Library /wp-admin/upload.php3.35 ▲0.1238.74 ▲1.26
APS Content Moderator /wp-admin/options-general.php?page=aps-content-moderator-cm-admin-page3.3838.73

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 35 new files
Database: no new tables, 13 new options
New WordPress options
db_upgraded
aps-content-moderator-cm-settings_comment-threshold
aps-content-moderator-cm-settings_category2-value
aps-content-moderator-cm-settings-data_access_url
aps-content-moderator-cm-settings_category3-value
can_compress_scripts
widget_theysaidso_widget
aps-content-moderator-cm-settings_comment-field-id
theysaidso_admin_options
widget_recent-comments
...

Browser metrics Passed 4 tests

An overview of browser requirements for APS Content Moderator Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲1714.66 ▲0.231.86 ▼0.0746.60 ▲1.32
Dashboard /wp-admin2,210 ▲305.69 ▼0.0190.85 ▼1.2542.40 ▲0.67
Posts /wp-admin/edit.php2,117 ▲202.06 ▲0.0335.57 ▼1.3134.15 ▼0.05
Add New Post /wp-admin/post-new.php1,537 ▲523.33 ▲0.04676.79 ▼13.8351.41 ▲4.80
Media Library /wp-admin/upload.php1,412 ▲124.23 ▲0.0195.40 ▼8.1246.68 ▲1.72
APS Content Moderator /wp-admin/options-general.php?page=aps-content-moderator-cm-admin-page1,0352.1837.9042.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 13 options in the database
    • aps-content-moderator-cm-settings-data_access_url
    • aps-content-moderator-cm-settings_category2-value
    • widget_recent-posts
    • can_compress_scripts
    • aps-content-moderator-cm-settings_category3-value
    • aps-content-moderator-cm-settings_comment-field-id
    • aps-content-moderator-cm-settings_comment-max-length-note
    • db_upgraded
    • aps-content-moderator-cm-settings_category1-value
    • aps-content-moderator-cm-settings_comment-threshold
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/aps-content-moderator/admin/views/aps-content-moderator-cm-settings.php:2
    • > PHP Parse error
      syntax error, unexpected 'endforeach' (T_ENDFOREACH), expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) in wp-content/plugins/aps-content-moderator/admin/views/comment-meta-box.php on line 61

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)
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=aps-content-moderator-cm-admin-page
    • > Network (severe)
    wp-content/plugins/aps-content-moderator/admin/css/images/ui-bg_flat_75_ffffff_40x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=aps-content-moderator-cm-admin-page
    • > Network (severe)
    wp-content/plugins/aps-content-moderator/admin/css/images/ui-bg_glass_75_e6e6e6_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: ai, unwanted content, filtering, text analysis, comment...

aps-content-moderator/aps-content-moderator.php Passed 13 tests

"APS Content Moderator Plugin" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
33 characters long description:
APS Content Moderator API Plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,280 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
CSS335541,173
PHP20186479935
JavaScript583995
PO File120077

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity7.17
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods39
▷ Static methods410.26%
▷ Public methods2871.79%
▷ Protected methods00.00%
▷ Private methods1128.21%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected