84% janey-ai

Code Review | Janey AI

WordPress plugin Janey AI scored 84% from 54 tests.

About plugin

  • Plugin page: janey-ai
  • Plugin version: 0.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.0
  • WordPress version: 6.3.1
  • First release: Feb 7, 2019
  • Latest release: Feb 13, 2019
  • Number of updates: 8
  • Update frequency: every 0.9 days
  • Top authors: sepiariver (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 705 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.58MB] [CPU: ▼14.68ms] Passed 4 tests

Analyzing server-side resources used by Janey AI
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1237.86 ▼3.60
Dashboard /wp-admin3.43 ▲0.1248.42 ▼1.21
Posts /wp-admin/edit.php3.48 ▲0.1248.25 ▲2.59
Add New Post /wp-admin/post-new.php3.21 ▼2.6738.79 ▼56.51
Media Library /wp-admin/upload.php3.35 ▲0.1234.60 ▲2.90
Janey AI /wp-admin/tools.php?page=janey-ai3.6136.83

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2,000 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Janey AI
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲12814.46 ▲0.081.98 ▲0.0445.67 ▼1.58
Dashboard /wp-admin2,236 ▲485.85 ▼0.04118.91 ▲9.8738.79 ▼5.63
Posts /wp-admin/edit.php2,130 ▲442.59 ▲0.5640.67 ▲6.0131.59 ▼2.94
Add New Post /wp-admin/post-new.php6,613 ▲5,09423.18 ▲0.11881.95 ▲221.3451.93 ▼5.30
Media Library /wp-admin/upload.php1,430 ▲424.98 ▲0.6693.84 ▼4.3840.39 ▼1.53
Janey AI /wp-admin/tools.php?page=janey-ai9332.2628.2926.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 510× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Conditional' not found in wp-content/plugins/janey-ai/includes/twig/vendor/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_TokenParser' not found in wp-content/plugins/janey-ai/trunk/includes/twig/vendor/twig/twig/lib/Twig/TokenParser/Do.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/janey-ai/includes/twig/vendor/twig/twig/test/Twig/Tests/ContainerRuntimeLoaderTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Name' not found in wp-content/plugins/janey-ai/includes/twig/vendor/twig/twig/lib/Twig/Node/Expression/AssignName.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/janey-ai/includes/janey-sdk/vendor/guzzlehttp/psr7/src/Uri.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_RuntimeLoaderInterface' not found in wp-content/plugins/janey-ai/includes/twig/vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/janey-ai/includes/twig/vendor/twig/twig/lib/Twig/Node/Do.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Extension' not found in wp-content/plugins/janey-ai/includes/twig/vendor/twig/twig/lib/Twig/Extension/Escaper.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Extension' not found in wp-content/plugins/janey-ai/includes/twig/vendor/twig/twig/lib/Twig/Extension/StringLoader.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Test_NodeTestCase' not found in wp-content/plugins/janey-ai/includes/twig/vendor/twig/twig/test/Twig/Tests/Node/Expression/NullCoalesceTest.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 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
7 plugin tags: images, taxonomy, tags, terms, photos...

janey-ai/janey-ai.php 92% from 13 tests

The entry point to "Janey AI" version 0.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Git Repository: There should be no Git repositories present in your plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected35,114 lines of code in 695 files:
LanguageFilesBlank linesComment linesLines of code
PHP5425,84711,12327,995
Markdown131,00303,211
reStructuredText891,9771,8072,627
JSON1300859
HTML2420300
XML28047
YAML210133
JavaScript10019
Twig86014
make1409

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity5.40
▷ Minimum class complexity1.00
▷ Maximum class complexity142.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces33
Interfaces82
Traits4
Classes1,018
▷ Abstract classes262.55%
▷ Concrete classes99297.45%
▷ Final classes12212.30%
Methods3,980
▷ Static methods2666.68%
▷ Public methods3,41885.88%
▷ Protected methods1644.12%
▷ Private methods39810.00%
Functions516
▷ Named functions31661.24%
▷ Anonymous functions20038.76%
Constants208
▷ Global constants83.85%
▷ Class constants20096.15%
▷ Public constants200100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin