10% reactor-core

Code Review | Reactor: Core

WordPress plugin Reactor: Core scored10%from 54 tests.

About plugin

  • Plugin page: reactor-core
  • Plugin version: 0.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7.3
  • WordPress version: 6.3.1
  • First release: Nov 19, 2014
  • Latest release: Mar 28, 2017
  • Number of updates: 41
  • Update frequency: every 21.0 days
  • Top authors: modemlooper (60.98%)apppresser (21.95%)tw2113 (21.95%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /16,449 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Reactor_Core::install() should not be called statically

Server metrics [RAM: ▲0.77MB] [CPU: ▼3.91ms] Passed 4 tests

Server-side resources used by Reactor: Core
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.38 ▲0.9147.52 ▲1.98
Dashboard /wp-admin4.08 ▲0.7451.90 ▼13.65
Posts /wp-admin/edit.php4.13 ▲0.7855.58 ▲5.76
Add New Post /wp-admin/post-new.php6.66 ▲0.7891.98 ▼9.73
Media Library /wp-admin/upload.php4.01 ▲0.7846.08 ▲6.74

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 57 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
json_api_plugin_version
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Reactor: Core
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.24 ▼0.342.27 ▲0.4843.49 ▼2.03
Dashboard /wp-admin2,201 ▲305.62 ▲0.0086.91 ▼2.5641.18 ▼6.10
Posts /wp-admin/edit.php2,103 ▼01.98 ▼0.0335.22 ▼7.8834.64 ▼7.36
Add New Post /wp-admin/post-new.php1,529 ▲322.22 ▼1.24695.39 ▲12.6274.17 ▲19.35
Media Library /wp-admin/upload.php1,400 ▲64.43 ▲0.26112.41 ▲11.1246.07 ▼1.52

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 50× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/reactor-core/json-rest-api/lib/class-wp-json-server.php on line 10
    • > PHP Warning
      include(./wp-load.php): failed to open stream: No such file or directory in wp-content/plugins/reactor-core/json-rest-api/lib/wp-json.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_JSON_Meta' not found in wp-content/plugins/reactor-core/json-rest-api/lib/class-wp-json-meta-posts.php:3
    • > PHP Warning
      include(): Failed opening './wp-load.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/reactor-core/json-rest-api/lib/wp-json.php on line 24
    • > PHP Warning
      include_once(ABSPATHWPINC/class-wp-json-server.php): failed to open stream: No such file or directory in wp-content/plugins/reactor-core/json-rest-api/lib/wp-json.php on line 29
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Test_JSON_TestCase' not found in wp-content/plugins/reactor-core/json-rest-api/tests/test-json-taxonomies.php:9
    • > PHP Warning
      include_once(ABSPATHWPINC/class-wp-xmlrpc-server.php): failed to open stream: No such file or directory in wp-content/plugins/reactor-core/json-rest-api/lib/wp-json.php on line 27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reactor-core/inc/api/v1/AppPresser_Reactor_Ajax.php:37
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/reactor-core/json-rest-api/lib/wp-json.php on line 28
    • > PHP Fatal error
      require(): Failed opening required '/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/reactor-core/json-rest-api/tests/bootstrap.php on line 21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

reactor-core/reactor-core.php 92% from 13 tests

The entry point to "Reactor: Core" version 0.2.5 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin7,320 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP451,7052,3465,460
Markdown237601,185
JavaScript1141265581
Bourne Shell115459
CSS201735

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity18.06
▷ Minimum class complexity1.00
▷ Maximum class complexity127.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes28
▷ Abstract classes310.71%
▷ Concrete classes2589.29%
▷ Final classes00.00%
Methods348
▷ Static methods30.86%
▷ Public methods29384.20%
▷ Protected methods4914.08%
▷ Private methods61.72%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants24
▷ Global constants1041.67%
▷ Class constants1458.33%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 compressed PNG files occupy 0.03MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/images/integrate-wp-300.png11.68KB10.77KB▼ 7.82%
inc/images/apps-300.png13.51KB12.68KB▼ 6.13%
inc/images/push-300.png10.46KB9.58KB▼ 8.50%