84% interactive-longform-articles

Code Review | Interactive Longform Articles

WordPress plugin Interactive Longform Articles scored84%from 54 tests.

About plugin

  • Plugin page: interactive-longf...
  • Plugin version: 2.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.2
  • WordPress version: 6.3.1
  • First release: Apr 19, 2019
  • Latest release: Jul 14, 2020
  • Number of updates: 9
  • Update frequency: every 50.3 days
  • Top authors: clickonmedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /800 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.72MB] [CPU: ▲1.04ms] Passed 4 tests

A check of server-side resources used by Interactive Longform Articles
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.6941.65 ▲5.21
Dashboard /wp-admin4.04 ▲0.6951.40 ▼9.60
Posts /wp-admin/edit.php4.13 ▲0.7653.25 ▲10.33
Add New Post /wp-admin/post-new.php7.15 ▲1.2694.28 ▼1.77
Media Library /wp-admin/upload.php3.96 ▲0.7344.09 ▲15.41
Interactive Longform Articles /wp-admin/options-general.php?page=interactive3.9333.95

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 402 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Interactive Longform Articles: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5414.73 ▲0.171.83 ▲0.2841.60 ▲2.35
Dashboard /wp-admin2,204 ▲245.69 ▲0.0292.46 ▼8.3238.75 ▼4.40
Posts /wp-admin/edit.php2,166 ▲662.02 ▲0.0541.21 ▲7.2637.31 ▲4.22
Add New Post /wp-admin/post-new.php7,240 ▲5,71224.16 ▲0.94953.04 ▲280.1436.36 ▼19.04
Media Library /wp-admin/upload.php1,418 ▲154.28 ▲0.0899.05 ▼7.3243.53 ▼1.36
Interactive Longform Articles /wp-admin/options-general.php?page=interactive8492.0923.4226.10

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 42× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_hookup' not found in wp-content/plugins/interactive-longform-articles/lib/cmb2/includes/CMB2_Options_Hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/interactive-longform-articles/lib/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/interactive-longform-articles/lib/cmb2/includes/rest-api/CMB2_REST.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/interactive-longform-articles/templates/header.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/interactive-longform-articles/lib/cmb2/includes/types/CMB2_Type_Wysiwyg.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/interactive-longform-articles/lib/cmb2/includes/helper-functions.php:127
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/interactive-longform-articles/lib/cmb2/includes/CMB2_Field.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/interactive-longform-articles/lib/cmb2/includes/rest-api/CMB2_REST_Controller.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_footer() in wp-content/plugins/interactive-longform-articles/templates/footer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/interactive-longform-articles/lib/cmb2/includes/types/CMB2_Type_Text_Date.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

interactive-longform-articles/interactive-longform-articles.php Passed 13 tests

The main PHP file in "Interactive Longform Articles" ver. 2.1.6 adds more information about the plugin and also serves as the entry point for this plugin
55 characters long description:
Interactive multimedia articles for longform journalism

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin56,957 lines of code in 245 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP622,2856,1817,755
JSON3006,469
CSS201,2421,2785,729
Sass22470302,265
JavaScript124154921,643
Markdown32410643
HTML16297
SVG20033

PHP code Passed 2 tests

This is a very shot 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.45
Average class complexity18.20
▷ Minimum class complexity1.00
▷ Maximum class complexity181.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes69
▷ Abstract classes811.59%
▷ Concrete classes6188.41%
▷ Final classes00.00%
Methods561
▷ Static methods8915.86%
▷ Public methods46883.42%
▷ Protected methods8915.86%
▷ Private methods40.71%
Functions35
▷ Named functions35100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants320.00%
▷ Class constants1280.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
lib/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
lib/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
lib/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
lib/cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%