73% activist

Code Review | Activist

WordPress plugin Activist scored73%from 54 tests.

About plugin

  • Plugin page: activist
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Nov 23, 2015
  • Latest release: Dec 22, 2015
  • Number of updates: 3
  • Update frequency: every 10.7 days
  • Top authors: willscott (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /733 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

A check of server-side resources used by Activist
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0545.46 ▲0.16
Dashboard /wp-admin3.37 ▲0.0758.78 ▲2.10
Posts /wp-admin/edit.php3.49 ▲0.1352.29 ▼2.85
Add New Post /wp-admin/post-new.php5.50 ▼0.3977.30 ▼27.60
Media Library /wp-admin/upload.php3.24 ▲0.0137.59 ▲0.26
Activist /wp-admin/options-general.php?page=activist-config3.6138.09

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
recovery_mode_email_last_sent
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Activist
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,351 ▼4103.55 ▼10.831.02 ▼0.7436.65 ▼8.37
Dashboard /wp-admin1,870 ▼3041.61 ▼3.9917.99 ▼73.2548.18 ▲9.20
Posts /wp-admin/edit.php2,008 ▼921.58 ▼0.427.50 ▼34.2333.48 ▼3.93
Add New Post /wp-admin/post-new.php71 ▼1,4660.45 ▼22.810.21 ▼644.719.69 ▼44.80
Media Library /wp-admin/upload.php69 ▼1,3280.45 ▼3.770.79 ▼95.179.54 ▼33.81
Activist /wp-admin/options-general.php?page=activist-config9501.418.0324.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • recovery_mode_email_last_sent
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=activist-config
    • > Error in wp-content/plugins/activist/includes/activist.class.php+66
    Uncaught ArgumentCountError: Too few arguments to function Activist::defer_script(), 1 passed in wp-includes/class-wp-hook.php on line 312 and exactly 2 expected in wp-content/plugins/activist/includes/activist.class.php:66
    Stack trace:
    #0 wp-includes/class-wp-hook.php(312): Activist::defer_script()
    #1 wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #2 wp-includes/class-wp-scripts.php(432): apply_filters()
    #3 wp-includes/class-wp-dependencies.php(137): WP_Scripts->do_item()
    #4 wp-includes/class-wp-scripts.php(782): WP_Dependencies->do_items()
    #5 wp-includes/script-loader.php(2099): WP_Scripts->do_footer_items()
    #6 wp-includes/script-loader.php(2194): print_footer_scripts()
    #7 wp-includes/class-wp-hook.php(310): _wp_footer_scripts()
    #8 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #9

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/activist/views/warning.php
    • > /wp-content/plugins/activist/activist.php
    • > /wp-content/plugins/activist/views/frame.php
    • > /wp-content/plugins/activist/views/offline.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/activist/views/config.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
4 plugin tags: caching, access, block, censorship

activist/activist.php Passed 13 tests

The entry point to "Activist" version 0.1.1 is a PHP file that has certain tags in its header comment area
47 characters long description:
Activate your users against network disruptions

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
There were no executable files found in this plugin492 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP87150454
Markdown16018
JavaScript12111
HTML1009

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity20.50
▷ Minimum class complexity15.00
▷ Maximum class complexity26.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27100.00%
▷ Public methods1866.67%
▷ Protected methods00.00%
▷ Private methods933.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png57.25KB15.10KB▼ 73.63%