84% idea-factory

Code Review | Idea Factory

WordPress plugin Idea Factory scored84%from 54 tests.

About plugin

  • Plugin page: idea-factory
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3
  • WordPress version: 6.3.1
  • First release: Dec 11, 2014
  • Latest release: Aug 19, 2015
  • Number of updates: 9
  • Update frequency: every 28.0 days
  • Top authors: nphaskins (66.67%)Tmeister (44.44%)

Code review

54 tests

User reviews

12 reviews

Install metrics

300+ active /10,947 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▼4.21ms] Passed 4 tests

A check of server-side resources used by Idea Factory
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2038.73 ▲2.91
Dashboard /wp-admin3.74 ▲0.3956.21 ▼9.02
Posts /wp-admin/edit.php3.79 ▲0.4348.03 ▲2.82
Add New Post /wp-admin/post-new.php6.23 ▲0.3482.88 ▼13.53
Media Library /wp-admin/upload.php3.57 ▲0.3439.92 ▲8.18
New Idea /wp-admin/post-new.php?post_type=ideas3.7849.59
Reset /wp-admin/edit.php?post_type=ideas&page=idea-factory-reset3.5738.60
All Ideas /wp-admin/edit.php?post_type=ideas3.7150.62
Help /wp-admin/edit.php?post_type=ideas&page=idea-factory-docs3.5735.73
Settings /wp-admin/edit.php?post_type=ideas&page=idea-factory-settings3.5735.78

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 45 new files
Database: 1 new table, 8 new options
New tables
wp_idea_factory
New WordPress options
db_upgraded
theysaidso_admin_options
if_settings_advanced
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
if_settings_main

Browser metrics Passed 4 tests

Checking browser requirements for Idea Factory
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,985 ▲22414.82 ▲0.461.72 ▲0.1045.73 ▲0.58
Dashboard /wp-admin2,391 ▲2236.32 ▲0.71110.14 ▲18.6438.81 ▼3.41
Posts /wp-admin/edit.php2,319 ▲2193.48 ▲1.5152.71 ▲14.7631.80 ▼6.39
Add New Post /wp-admin/post-new.php1,570 ▲3923.25 ▲0.34649.40 ▲51.8136.65 ▼47.84
Media Library /wp-admin/upload.php1,456 ▲624.36 ▲0.1881.88 ▼18.4442.90 ▲0.03
New Idea /wp-admin/post-new.php?post_type=ideas2,4527.70182.1967.06
Reset /wp-admin/edit.php?post_type=ideas&page=idea-factory-reset1,0143.2039.4023.88
All Ideas /wp-admin/edit.php?post_type=ideas1,3253.4249.7926.86
Help /wp-admin/edit.php?post_type=ideas&page=idea-factory-docs1,0903.3840.2328.52
Settings /wp-admin/edit.php?post_type=ideas&page=idea-factory-settings1,1613.3054.9535.15

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
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • if_settings_advanced
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • if_settings_main
    • can_compress_scripts

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
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
The following issues need your attention
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/idea-factory/includes/class.type.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/idea-factory/admin/includes/class.meta.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/idea-factory/public/includes/helpers.php:126
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/idea-factory/templates/template-ideas.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/idea-factory/includes/class.process-vote.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/idea-factory/includes/class.process-status.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/idea-factory/admin/includes/class.settings.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/idea-factory/public/includes/class.assets.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/idea-factory/public/includes/class.shortcodes.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/idea-factory/includes/class.process-entry.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: feedback, front end voting, front end submission, voting, idea...

idea-factory/idea-factory.php Passed 13 tests

The entry point to "Idea Factory" version 1.2 is a PHP file that has certain tags in its header comment area
44 characters long description:
Front-end user submission and voting system.

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
Everything looks great! No dangerous files found in this plugin2,855 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP196536921,421
LESS810459736
JavaScript512133345
PO File2123129321
Markdown112031
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity11.14
▷ Minimum class complexity2.00
▷ Maximum class complexity43.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods77
▷ Static methods79.09%
▷ Public methods7293.51%
▷ Protected methods00.00%
▷ Private methods56.49%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin