63% community-watch

Code Review | Community Watch

WordPress plugin Community Watch scored63%from 54 tests.

About plugin

  • Plugin page: community-watch
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.6
  • WordPress version: 6.3.1
  • First release: Apr 13, 2014
  • Latest release: Apr 14, 2014
  • Number of updates: 3
  • Update frequency: every 16.3 days
  • Top authors: jjeaton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /846 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.79MB] [CPU: ▼29.59ms] Passed 4 tests

Analyzing server-side resources used by Community Watch
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1339.47 ▼2.18
Dashboard /wp-admin3.15 ▼0.1529.09 ▼23.94
Posts /wp-admin/edit.php3.15 ▼0.2129.86 ▼21.30
Add New Post /wp-admin/post-new.php3.15 ▼2.7429.02 ▼63.05
Media Library /wp-admin/upload.php3.15 ▼0.0824.82 ▼10.07
Community Watch /wp-admin/options-general.php?page=community-watch3.1528.93
Content Reports /wp-admin/edit.php?post_type=cw_content_report3.1529.72

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Community Watch
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲12913.77 ▼0.498.81 ▲6.9943.48 ▲1.30
Dashboard /wp-admin2,206 ▲295.61 ▼0.0393.62 ▲1.3242.41 ▲0.34
Posts /wp-admin/edit.php2,111 ▲112.16 ▲0.1839.76 ▼2.0535.15 ▲2.30
Add New Post /wp-admin/post-new.php1,549 ▲2318.16 ▼5.22617.99 ▼46.1658.13 ▼0.33
Media Library /wp-admin/upload.php1,408 ▲54.22 ▼0.03101.40 ▼0.3945.01 ▲2.10
Community Watch /wp-admin/options-general.php?page=community-watch8732.0225.4235.78
Content Reports /wp-admin/edit.php?post_type=cw_content_report1,0881.9531.5028.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/community-watch/lib/class-sys-bot.php+98
    Trying to get property 'data' of non-object
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% 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
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cw_content_report
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/community-watch/lib/class-sys-bot.php+98
    Trying to get property 'data' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cw_content_report
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/community-watch/lib/class-sys-bot.php+98
    Trying to get property 'user_nicename' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cw_content_report
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/community-watch/lib/class-sys-bot.php+107
    Trying to get property 'ID' of non-object
    • > GET request to /wp-admin/options-general.php?page=community-watch
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=community-watch
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=community-watch
    • > Notice in wp-content/plugins/community-watch/views/admin.php+81
    Trying to access array offset on value of type bool

SRP 0% 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/community-watch/views/public.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/community-watch/views/admin.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: community, content

community-watch/community-watch.php Passed 13 tests

The primary PHP file in "Community Watch" version 1.0.0 is used by WordPress to initiate all plugin functionality
70 characters long description:
Allows users to report inappropriate content across all content types.

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
No dangerous file extensions were detected626 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP7152400596
JavaScript13230

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity25.50
▷ Minimum class complexity19.00
▷ Maximum class complexity32.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods34
▷ Static methods411.76%
▷ Public methods3397.06%
▷ Protected methods00.00%
▷ Private methods12.94%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.44MB with 0.30MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/tick-x.png1.21KB0.46KB▼ 61.71%
screenshot-1.png450.52KB105.76KB▼ 76.52%