73% mainwp-child-reports

Code Review | MainWP Child Reports

WordPress plugin MainWP Child Reports scored73%from 54 tests.

About plugin

  • Plugin page: mainwp-child-reports
  • Plugin version: 2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Aug 10, 2015
  • Latest release: Oct 31, 2023
  • Number of updates: 90
  • Update frequency: every 33.6 days
  • Top authors: mainwp (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

70,000+ active /856,926 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.42MB] [CPU: ▲4.48ms] Passed 4 tests

This is a short check of server-side resources used by MainWP Child Reports
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.59 ▲2.1250.13 ▲5.92
Dashboard /wp-admin5.88 ▲2.5364.30 ▼4.90
Posts /wp-admin/edit.php5.93 ▲2.5761.33 ▲10.86
Add New Post /wp-admin/post-new.php8.42 ▲2.5399.58 ▲6.02
Media Library /wp-admin/upload.php5.74 ▲2.5159.32 ▲23.63

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 208 new files
Database: 2 new tables, 6 new options
New tables
wp_mainwp_stream
wp_mainwp_stream_meta
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for MainWP Child Reports
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4013.51 ▼0.751.68 ▲0.0139.80 ▼3.09
Dashboard /wp-admin2,210 ▲295.77 ▲0.0699.25 ▼3.7042.35 ▲5.83
Posts /wp-admin/edit.php2,109 ▲92.17 ▲0.2238.79 ▲1.5533.20 ▼2.39
Add New Post /wp-admin/post-new.php1,546 ▲1818.30 ▼4.74596.49 ▼64.0566.70 ▼1.11
Media Library /wp-admin/upload.php1,412 ▲124.27 ▲0.06103.80 ▲7.7542.32 ▲1.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_mainwp_stream
    • wp_mainwp_stream_meta
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 items
  • 46× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_MainWP_Stream\\Alert_Type' not found in wp-content/plugins/mainwp-child-reports/alerts/class-alert-type-email.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WP_MainWP_Stream\\wp_mainwp_stream_get_instance() in wp-content/plugins/mainwp-child-reports/classes/class-date-interval.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mainwp-child-reports/includes/feeds/json.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_MainWP_Stream\\Connector' not found in wp-content/plugins/mainwp-child-reports/connectors/class-connector-installer.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_MainWP_Stream\\Exporter' not found in wp-content/plugins/mainwp-child-reports/exporters/class-exporter-csv.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_MainWP_Stream\\Connector' not found in wp-content/plugins/mainwp-child-reports/connectors/class-connector-comments.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_MainWP_Stream\\Alert_Type' not found in wp-content/plugins/mainwp-child-reports/alerts/class-alert-type-highlight.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_MainWP_Stream\\Connector' not found in wp-content/plugins/mainwp-child-reports/connectors/class-connector-media.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_MainWP_Stream\\Connector' not found in wp-content/plugins/mainwp-child-reports/connectors/class-connector-wordpress-seo.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_MainWP_Stream\\Connector' not found in wp-content/plugins/mainwp-child-reports/connectors/class-connector-blogs.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Tags: There are too many tags (16 tag instead of maximum 10)
  • Screenshots: Please add images for these screenshots: #1 (The MainWP Child Reports Screen), #2 (The MainWP Child Reports Settings Screen)
Please take inspiration from this readme.txt

mainwp-child-reports/mainwp-child-reports.php 92% from 13 tests

The principal PHP file in "MainWP Child Reports" v. 2.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected30,095 lines of code in 198 files:
LanguageFilesBlank linesComment linesLines of code
PHP693,1568,49514,467
JavaScript1212,82993512,165
PO File18339872,294
CSS5196461,138
Markdown17020
SVG10011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity31.94
▷ Minimum class complexity1.00
▷ Maximum class complexity141.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes62
▷ Abstract classes23.23%
▷ Concrete classes6096.77%
▷ Final classes00.00%
Methods845
▷ Static methods293.43%
▷ Public methods81296.09%
▷ Protected methods91.07%
▷ Private methods242.84%
Functions43
▷ Named functions1227.91%
▷ Anonymous functions3172.09%
Constants32
▷ Global constants26.25%
▷ Class constants3093.75%
▷ Public constants30100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ui/stream-icons/datepicker-icons-gray.png8.33KB4.17KB▼ 49.88%
ui/stream-icons/menuicon-sprite-2x.png2.06KB0.88KB▼ 57.38%
ui/stream-icons/menuicon-sprite.png1.47KB0.59KB▼ 60.13%
ui/stream-icons/datepicker-icons.png6.15KB4.17KB▼ 32.13%
ui/stream-icons/wp-cli.png2.42KB1.77KB▼ 26.80%