10% oppia-integration

Code Review | Oppia integration plugin

WordPress plugin Oppia integration plugin scored10%from 54 tests.

About plugin

  • Plugin page: oppia-integration
  • Plugin version: 1.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 5, 2017
  • Latest release: Oct 5, 2017
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: aleksandrsuhhinin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /558 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/oppia-integration/includes/class.content-fetcher.php+6
    Constant OPPIA_INT_PLUGIN_URL already defined

Server metrics [RAM: ▼1.91MB] [CPU: ▼55.96ms] Passed 4 tests

Analyzing server-side resources used by Oppia integration plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.3811.19 ▼33.09
Dashboard /wp-admin2.10 ▼1.208.58 ▼47.69
Posts /wp-admin/edit.php2.10 ▼1.258.45 ▼45.68
Add New Post /wp-admin/post-new.php2.10 ▼3.796.87 ▼97.39
Media Library /wp-admin/upload.php2.10 ▼1.138.24 ▼29.25

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Oppia integration plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲5014.36 ▼0.041.72 ▼0.5244.33 ▲1.75
Dashboard /wp-admin2,213 ▲335.56 ▼0.0986.08 ▼16.7640.04 ▼5.02
Posts /wp-admin/edit.php2,118 ▲181.98 ▲0.0132.25 ▼2.0037.31 ▲2.97
Add New Post /wp-admin/post-new.php1,551 ▲2322.93 ▼0.07703.70 ▲29.8455.84 ▲1.63
Media Library /wp-admin/upload.php1,415 ▲154.26 ▲0.0796.95 ▼6.2443.29 ▲0.27

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
    • > Notice in wp-content/plugins/oppia-integration/includes/class.content-fetcher.php+6
    Constant OPPIA_INT_PLUGIN_URL already defined
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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 short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/oppia-integration/oppia-integration.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_js() in wp-content/plugins/oppia-integration/includes/class.content-fetcher.php:2

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: import, widget, feeds

oppia-integration/oppia-integration.php Passed 13 tests

"Oppia integration plugin" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
69 characters long description:
Fetches and embeds Courses, Events, Webinars, etc. from oppia.fi feed

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
No dangerous file extensions were detected718 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP410335574
CSS1130105
JavaScript19039

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity26.50
▷ Minimum class complexity21.00
▷ Maximum class complexity32.00
Average method complexity6.10
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods330.00%
▷ Public methods770.00%
▷ Protected methods00.00%
▷ Private methods330.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/chevron-right.png2.36KB2.28KB▼ 3.35%